1

I'm a little bit confused.

XML and XML-Schema are not the same thing, right? Can i know what is the difference between this two entities?

San
  • 115
  • 3
  • 16

2 Answers2

2

Basically an Xml-schema (XSD) file defines how the XML file is going to look like.

So an XSD or Schema file, defines the structure of the XML file. So it will define what the possible fields are and what size they are going to be.

An XML file, is the file that contains the information and is created in the format of the XSD file.

Priyank
  • 1,180
  • 1
  • 15
  • 26
2

But what the difference between this two entities?

An analogy:

  • written engineering plans for building a car = xsd file
  • properly built car = xml file

The xsd helps with two steps in the process:

  • gives the assembly line workers directions to build the car = xml creators
  • specs to test the quality of the finished car = validate XML document

so the difference is XML is the product, XSD is the specification or directions to make that product, and validate test that product

Extensive answer here.

It can get confusing for the newcomer, because XSD's are written in XML and guided by an XSD themselves. See: Schema to validate schemas.

Community
  • 1
  • 1
Paulb
  • 1,471
  • 2
  • 16
  • 39