c# - Displaying XML schema elements in treeview in order of appearance in XML -
i need display xsd files in treeview. found 1 solution here!, displays nodes in file in order appear.
need display them in order appear in xml file, , nested under elements nested under in xml file:
<?xml version="1.0" encoding="ibm437"?> <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema"> <xs:element name="cat" type="xs:string"/> <xs:element name="dog" type="xs:string"/> <xs:element name="pets"> <xs:complextype> <xs:choice minoccurs="0" maxoccurs="unbounded"> <xs:element ref="cat"/> <xs:element ref="dog"/> </xs:choice> </xs:complextype> </xs:element> </xs:schema>
would displayed this:
-pets -dogs -cats
how undentify root node? think once got can recurse each type in root elemet find name.
looking @ xsd specifically!. should start element called 'document'? contains 2 top level elements in type of file - 'grphdr' , 'orgnlgrpinfandsts'.
standard way tackle this?
apparently there isn't since xsd may contain more 1 root element.
Comments
Post a Comment