Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / October 2006



Tip: Looking for answers? Try searching our database.

XML to Tree component

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jgeorg - 31 Oct 2006 11:28 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.