I'm looking for an easy way to generate a sample XML file from an XSD that do not contain a single root node.
+1
A:
I don't think you can do that without specifying the root. XML Schema is designed such that all top-level xs:element
can represent the root node, so you cannot distinguish it given the schema alone. You'll have to ask user to explicitly specify the xs:element
he wants to treat as root.
Pavel Minaev
2009-08-19 19:00:41
+1
A:
If your file doesn't have an xml declaration at the top, a single root node, and follow all other XML rules, it's not XML, its a text file. You can't treat any old text files like XML.
Will
2009-08-19 19:08:46