0
<people>
  <person uid="????">
    <name>?????</name>
    <name>????</name>
  </person>
  <person phone="?????">
    <name>?????</name>
    <name>??????></name>
    <name>?????</name>
  </person>
</people>

Is the above XML Document not a well formed XML document because each person element contains more that one elements? Also is XSD XML Schema a set of recommendations for valid XML instance documents?

  • 1
    Your XML is well formed. Also, see http://stackoverflow.com/questions/134494/is-there-a-difference-between-valid-xml-and-well-formed-xml – Daniel Haley May 06 '16 at 22:33

1 Answers1

1

Your document is well formed but missing a xml declaration. This might cause problems depending of what you need to do and the xml version you use. See Daniels comment for further details.

You can use xsd xml scheme to define the elements and attributes you need to use in your xml files.

With a xsd you can use validation tools to check whether you files are valid or not.

Another hint is to read Wikipedia. You will find all answers in the articles there.

Nikolay
  • 87
  • 10