Outline ·
[ Standard ] ·
Linear+
XML document cannot contain multiple root level
|
everling
|
Oct 17 2009, 10:12 PM
|
|
If I'm interpreting right, this should be an example of your problem. CODE <?xml version="1.0"?> <rootNode1> <childGen1> </childGen1> </rootNode1> <rootNode2> <childGen1> </childGen1> </rootNode2> This is an example of what a valid XML file may look like. CODE <?xml version="1.0"?> <rootNode> <childGen1> </childGen1> <childGen1> </childGen1> </rootNode> Please note that an XML document cannot contain multiple root nodes.
|
|
|
|
|
|
everling
|
Oct 18 2009, 01:29 AM
|
|
Not having any errors doesn't mean that the application will work as expected. It may instead silently use default values if it didn't detect any recognisable input; default values that may not be what you want.
If you're lucky, the application that uses that XML isn't sensitive to where that XML fragment is located, or the default values happened to be what you wanted. Location of XML fragments can be a factor for XML using apps.
Haha. "<! --" gets escaped as "[bad html removed]". No wonder your code pasting didn't made sense in the first place. Bad forum!
I don't really understand why they sanitised it by replacing it. Isn't escaping it with "<!--" enough?
This post has been edited by everling: Oct 18 2009, 01:32 AM
|
|
|
|
|