Page 1 of 1

Generate sample XML document from XSD without 1 root element

Posted: Wed Aug 19, 2009 9:19 pm
by alexvb74
Hello,
I'm having a bit of difficulties generating a sample XML document from XSD schema that do not have a single root element. The utility is forcing me to select a root element and doing so it drops off all elements that are not under the root item chosen. Is there a way to generate sample xml doc without having to select root element, or perhaps a work around?

Please advice

Thanks,
Alex

Re: Generate sample XML document from XSD without 1 root element

Posted: Thu Aug 20, 2009 10:54 am
by sorin_ristache
Hello,
alexvb74 wrote:The utility is forcing me to select a root element and doing so it drops off all elements that are not under the root item chosen.
Do you mean that the elements that are declared in the XML Schema but are not included in the content model of the root element are not present in the generated XML instance? That is an effect of setting a root element for your generated XML instances and cannot be avoided. For an XML Schema with multiple declarations of global elements any global element can be a root of an XML instance. Depending on the content model of the selected root element other elements declared in the same XML Schema may not be included in this content model.


Regards,
Sorin