Im working with a hierarchial tool that has unlimited levels. Im trying to design a element that will build out infintely with tree nodes depending on the inbound data. There is basically 1 EID root, then below it there can be an unlmited tree build out. I want the xml structure to build out like the tree as well. I think Im just missing something simple.

<xs:complexType name="HierarchyEID">
<xs:element name="organization" type="EMPIORG:HierarchyOrganization" maxOccurs="unbounded"/>
<xs:attribute name="value" type="xs:long"/>
<xs:attribute name="level">
<xs:restriction base="xs:string">
<xs:enumeration value="parent"/>
<xs:enumeration value="sibling"/>
<xs:enumeration value="child"/>

Im thinking the response will look like this with someone else added. This returns a list of treenodeelements. But you cant build into the tree nodes.

<xs:element name="HierarchialResponse">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="TreeNodeElement" type="EMPIORG:HierarchyEID"/>

Thanks for any help