Hi all,
I'll appreciate any available help to my following problem:
I use an xml connector component to read the following simple xml:
How can I bind the results to a tree component using formatter?
I want to have a tree view with town names (label) and company names only.
Thanks in advance
<?xml version="1.0" encoding="UTF-8"?>
<companies>
<town label="London">
<company>
<name>Microsoft</name>
<id>204993</id>
<manager>John Smith</manager>
</company>
<company>
<name>IBM</name>
<id>239178</id>
<manager>Peter Jones</manager>
</company>
</town>
<town label="Paris">
<company>
<name>Evolution S.A.</name>
<id>226600</id>
<manager>John Sparks</manager>
</company>
</town>
</companies>
flashofscarlet - 31 Oct 2006 12:30 GMT
Hi!
The Tree cannot work with all types of XML. usually, we use the following XML
Schema for the Tree
<node>
<node label="Mail">
<node label="INBOX"/>
<node label="Personal Folder">
<node label="Business" isBranch="true" />
<node label="Demo" isBranch="true" />
<node label="Personal" isBranch="true" />
<node label="Saved Mail" isBranch="true" />
<node label="bar" isBranch="true" />
</node>
<node label="Sent" isBranch="true" />
<node label="Trash"/>
</node>
</node>
Depending on how you want to visualize the above XML, you can set isBranch to
true or false or use it else where too.
Also, in the Binding tab for the XML Connector component, in the BOUND TO,
select "results:XML" and bind that to the DataProvider of the Tree