Reputation: 7041
I am new to xml, so if someone could point me out to what is wrong here I would bevery glad.
I am basically trying to validate a xml document in the form
<?xml version="1.1" encoding="UTF-8"?>
<tag1>foo</tag1>
<tag2>bar</tag2>
<tree>
<moreStuffBelow></moreStuffBelow>
<!-- // -->
</tree>
and am getting these error messages from the W3C validator :
Errors found while checking this document as XML!
document type does not allow element "tag2" here
document type does not allow element "tree" here
Thank you
Upvotes: 1
Views: 243
Reputation: 1881
Each XML must have one single root element. In your case there isn't a root element.
Upvotes: 2
Reputation: 91598
All XML needs one and only one root element:
<Something>
<tag1>1</tag1>
<tag2>Cipret</tag2>
<tree>
<moreStuffBelow></moreStuffBelow>
<!-- // -->
</tree>
</Something>
Upvotes: 1