XML to tree structure

Hi guys
Not used Java in a while (or done much programming in a while to be honest) and i've been set the task of reading an XML document into a tree structure but without using any existing XML libraries. I'm a little bit stumped which line to go down and wondered if anyone had could help me out with a few suggestions as to how to tackle it.
Many thanks

redbulladdict wrote:
yeah i have read the article and i get that i need to read in the first tag as the root and then add the next tag as a node and then its data as a node,Once you write the code to read a node, you just apply it recursively to these other nodes.
then once that tag has closed, back track and the next tag as a node and so on.To back track you should just have to return from your recursive method. Returning from the method implicitly pops a stack thus returning you to the enclosing tag.
But having real trouble making a start on the source code, can't find any good examples to get me started. My coding skills are really rusty.Can you write a simple "Hello world" program? Can you open a file, and read in one line at a time, and count the lines?
Thanks for giving me all this help.

Similar Messages

  • XML with DefaultTreeModel structure

    I�m developing an application which uses DefaultTreeModel as one of its major structure...
    may I use a XML file as persistence ? May I map directly between the TreeModel and a XML file ?
    Actually people around here cited Castor as the solution, but I can�t find in the castor documentation about trees mapping, just Vector, Hashtable and arrays...

    I�m thinking like this way:
    the XML is a tree structure...
    the TreeModel is obviously a tree structure...
    then, I should be able to create a Java DefaultTreeModel which reflects the XML file contents..
    I�m reading the SUN tutorial ...

  • t:tree component is not rendering tree structure for my page

    Dear dudes,
    I want to create a simple tree structure in my jsf page backed by a backing bean.
    But my jsf page is getting executed but my tree is not getting displayed.
    my jsf page:<ui:composition xmlns="http://www.w3.org/1999/xhtml"
         xmlns:ui="http://java.sun.com/jsf/facelets"
         xmlns:h="http://java.sun.com/jsf/html"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:s="http://jboss.com/products/seam/taglib"
         xmlns:rich="http://richfaces.ajax4jsf.org/rich"
         xmlns:t="http://myfaces.apache.org/tomahawk"
         xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
    <f:view>
         <html>
              <body>
                   <h:form>
                        <t:tree id="tree" value="#{mytreeBean.myTree}" styleClass="tree"
                             nodeClass="treenode" selectedNodeClass="treenodeSelected"
                             >
                        </t:tree>
                   </h:form>
              </body>
         </html>
    </f:view>
    </ui:composition>Mybacking bean:
    package org.test.tree;
    import java.util.Iterator;
    import java.util.List;
    import org.apache.myfaces.custom.tree.DefaultMutableTreeNode;
    import org.apache.myfaces.custom.tree.model.DefaultTreeModel;
    import com.srit.framework.web.BasePage;
    import com.srit.healthcare.common.lookupentity.repository.ILookupRepository;
    import com.srit.healthcare.common.tree.domain.RcareTree;
    public class MyTreebean {
         private DefaultTreeModel myTree;
         public DefaultTreeModel getMyTree() {
              return myTree=getTreeModel();
         public void setMyTree(DefaultTreeModel myTree) {
              this.myTree = myTree;
         /*public MyTreebean() {
              DefaultMutableTreeNode root = new DefaultMutableTreeNode("XY");
              DefaultMutableTreeNode a = new DefaultMutableTreeNode("A");
              root.insert(a);
              DefaultMutableTreeNode b = new DefaultMutableTreeNode("B");
              root.insert(b);
              DefaultMutableTreeNode c = new DefaultMutableTreeNode("C");
              root.insert(c);
              DefaultMutableTreeNode node = new DefaultMutableTreeNode("a1");
              a.insert(node);
              node = new DefaultMutableTreeNode("a2 ");
              a.insert(node);
              node = new DefaultMutableTreeNode("b ");
              b.insert(node);
              a = node;
              node = new DefaultMutableTreeNode("x1");
              a.insert(node);
              node = new DefaultMutableTreeNode("x2");
              a.insert(node);
              myTree = new DefaultTreeModel(root);
         public DefaultTreeModel getTreeModel() {
              DefaultMutableTreeNode root = new DefaultMutableTreeNode("XY");
              DefaultMutableTreeNode a = new DefaultMutableTreeNode("A");
              root.insert(a);
              DefaultMutableTreeNode b = new DefaultMutableTreeNode("B");
              root.insert(b);
              DefaultMutableTreeNode c = new DefaultMutableTreeNode("C");
              root.insert(c);
              DefaultMutableTreeNode node = new DefaultMutableTreeNode("a1");
              a.insert(node);
              node = new DefaultMutableTreeNode("a2 ");
              a.insert(node);
              node = new DefaultMutableTreeNode("b ");
              b.insert(node);
              a = node;
              node = new DefaultMutableTreeNode("x1");
              a.insert(node);
              node = new DefaultMutableTreeNode("x2");
              a.insert(node);
              return myTree = new DefaultTreeModel(root);
    }Also i've configured my tomahawk-taglib file in my web.xml .
    My backing bean is configured in my faces-config.xml
    But i'm not able to get my tree structure in my page .
    Any help would be appreciated.
    Regards

    Dear akash,
    yes i'm seeing the jsf tags <t:tree>
    But when i modify my jsf page , in my configuration files i'm getting the following errors:
    In web.xml
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">
    </web-app>
    error message:  cannot find the declaration of element web-apps
    error message: failed to read schema document http://java.sun.com/xml/ns/j2ee             http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd  because 1) couldnot find the document 2) the document could not be read 3) the root element of the document is not <xsd:schema>In another configuration file:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:aop="http://www.springframework.org/schema/aop"
         xmlns:tx="http://www.springframework.org/schema/tx"
         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
                http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
    Error: cannot find the declaration of element 'beans'I'm a novice to JSF technology and plz guide me properly.

  • Tree structure of portal application in NWDS

    Hi all,
    Im new to portal applications and I did not under stand the tree structure that appears after we start portal application in ep perspective in NWDS. Especially the PORTAL-INF and src.code in the tree structure .If any body has any relevant information or document about it please send me.

    portal applications are same as the Web applications developed in Java, JSP ....
    PORTAL-INF is same as the WEB-INF in normal web application structure.
    in Web application we create .war file whereas here we create as .par file.
    in web application we have web.xml inside WEB-INF folder where as here we have portalapp.xml.
    src.core and src.api is used as the source code folder.
    You can check this in "Java Build path" if u go to the project properties.
    Hope this give u a small idea on portal files structure.
    cheers.
    Chinmaya
    Reward points for hellpful answers.

  • Dynamic tree structure (expand/collapse)

    i want to do one tree struc example (expand /collapse)
    using xml;
    like
    WOrld
    |
    |
    ----INDIA
    |
         -------Andhrapradesh
    |
              |
    -----------------Hyderabad
              |               |                         |           Visakhapatnam
              Karnataka
    |
              |                    
    Tamilnadu
    America
    |
    Australia
    in the frame at left side tree structure will be there ;when i click world hyperlink and at the right side one forum will come like this;
    country name ---------
    description ---------
    when i enter america and enter submit;the country should come in the left frame;i will refresh left frame when click submit;ofcourse i know that;like wise when i click state hyperlink
    state name ---------
    description ---------
    statename should come under state tree node;
    i will also maintain this info in database also;i am using oracle9i;how can i do this the tree structure;how to approach;if anybody give me any links revelant to this?atleast give me some idea what to do?please dont give me the DOM tutorial or SAX Tutorial cos i already gone through but i didnt get any idea.
    bye
    chaitanya

    Initailly set xerces.jar (parser, freeware download from apache site) to calss path
    Suppose
    <WORLD>
    <INDIA>
    <ANDHRA>abc</ANDHRA>
    <VISHAKHA>fsdfd</VISHAKHA>
    <UP>dss</UP>
    </INDIA>
    <USA>
    <FLORIADA>bsbs</FLORIADA>
    <NEWYORK>dsds</NEWYORK>
    </USA>
    </WORLD>
    try{
    dbf = DocumentBuilderFactory.newInstance();
    db = dbf.newDocumentBuilder();
    mapDocument = db.newDocument();
    Element worldElement = mapDocument.createElement("WORLD");
    Element indiaElement = mapDocument.createElement("INDIA");
    Element andhraElement = mapDocument.createElement("ANDHRA");
    andhraElement.appendChild(mapDocument.createTextNode("sdsd");
    Element vishakhaElement = mapDocument.createElement("VISHKHA");
    vishkhaElement.appendChild(mapDocument.createTextNode("sdfdf");
    Element upElement = mapDocument.createElement("UP");
    upElement.appendChild(mapDocument.createTextNode("fsfs");     
    indiaElement.appendChild(andhraElement)
         .appendChild(vishkhaElement)
         .appendChild(upYElement)
    //lly do for usaELement
    //finally add indiaElemebnt and usaElement to worldElement                    
    worldElement.appendChild(indiaElement)
         .appendChild(usaElement)
    mapDocument.appendChild(worldElement);          
    }catch(FactoryConfigurationError fce){
         fce.printStackTrace();
    }catch(ParserConfigurationException pce){
    pce.printStackTrace();
    I think this u need

  • Generate Tree Structure from DB - XSQL??

    We have a table that contains a tree structure using Parent/Child fields. We use "Connect By" to extract this in normal applications to show in a tree control.
    We now want this in XML format output by our web server, where a client side app running in the browser can load this.
    I have looked at XSQL utility but it looks to only generate a simple flat structure.
    Anyone have an idea of how to automatically create a tree structure straight from the DB?
    Thanks
    Rob

    You downloaded the wrong XML Parser!
    XSQL requires Java Parser. Well, there's a copy included with the XSQL package so you actually don't need to do another download.
    You really don't need XSQL if you just want a XML file from DB, you just needed a XML SQL Utility. Download that and run the samples.

  • How to  create Tree Structure for given data?

    Hi,
    I have to create a tree structure of Folders and the contents in the Folder.
    I have a XML, it contains data for the tree structure to display. How can I create a tree structure which would look like below
    Parent
       Child
         Supporting Views
            Raw eInfotree Table Views
            Background Calculations
            QC Data Views
         Calculation Views
         Unit Operation Views
            Cell Culture Views
            Purification Views
            MFR Views
         Personal Views
    All the nodes should have folder Icon.
    Please find the XML as
    <?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2007-05-02T07:37:37" EndDate="2007-05-02T16:59:53" StartDate="2007-05-02T16:59:53" Version="11.5.3"><Rowset><Columns><Column Description="" MaxRange="1" MinRange="0" Name="TK" SQLDataType="4" SourceColumn="TK"/><Column Description="" MaxRange="1" MinRange="0" Name="NAME" SQLDataType="1" SourceColumn="NAME"/><Column Description="" MaxRange="1" MinRange="0" Name="TYPE" SQLDataType="1" SourceColumn="TYPE"/><Column Description="" MaxRange="1" MinRange="0" Name="PK" SQLDataType="4" SourceColumn="PK"/></Columns>
    <Row><TK>1</TK><NAME>Parent</NAME><TYPE>F</TYPE><PK>0</PK></Row>
    <Row><TK>2</TK><NAME>Child</NAME><TYPE>F</TYPE><PK>1</PK></Row>
    <Row><TK>3</TK><NAME>Supporting Views</NAME><TYPE>F</TYPE><PK>2</PK></Row>
    <Row><TK>4</TK><NAME>Raw eInfotree Table Views</NAME><TYPE>F</TYPE><PK>3</PK></Row>
    <Row><TK>5</TK><NAME>Background Calculations</NAME><TYPE>F</TYPE><PK>3</PK></Row>
    <Row><TK>6</TK><NAME>QC Data Views</NAME><TYPE>F</TYPE><PK>3</PK></Row>
    <Row><TK>7</TK><NAME>Calculation Views</NAME><TYPE>F</TYPE><PK>2</PK></Row>
    <Row><TK>8</TK><NAME>Unit Operation Views</NAME><TYPE>F</TYPE><PK>2</PK></Row>
    <Row><TK>9</TK><NAME>Cell Culture Views</NAME><TYPE>F</TYPE><PK>8</PK></Row>
    <Row><TK>10</TK><NAME>Purification Views</NAME><TYPE>F</TYPE><PK>8</PK></Row>
    <Row><TK>11</TK><NAME>MFR Views</NAME><TYPE>F</TYPE><PK>8</PK></Row>
    <Row><TK>12</TK><NAME>Personal Views</NAME><TYPE>F</TYPE><PK>2</PK></Row>
    </Rowset>
    </Rowsets>

    Vishal,
    If you structure your data with two columns, the first being the Node name and the second being the Parent node name (see your information below), the iBrowser applet will make a nice data driven tree with all of the SelectionEvent or navigational capabilities you want.
    <?xml version="1.0" encoding="UTF-8"?>
    <Rowsets DateCreated="2007-05-02T07:37:37" EndDate="2007-05-02T16:59:53" StartDate="2007-05-02T16:59:53" Version="11.5.3">
    <Rowset><Columns><Column Description="" MaxRange="1" MinRange="0" Name="NAME" SQLDataType="1" SourceColumn="NAME"/><Column Description="" MaxRange="1" MinRange="0" Name="PARENT" SQLDataType="1" SourceColumn="PARENT"/></Columns>
    <Row><NAME>Parent</NAME><PARENT></PARENT></Row>
    <Row><NAME>Child</NAME><PARENT>Parent</PARENT></Row>
    <Row><NAME>Supporting Views</NAME><PARENT>Child</PARENT></Row>
    <Row><NAME>Calculation Views</NAME><PARENT>Child</PARENT></Row>
    <Row><NAME>Unit Operation Views</NAME><PARENT>Child</PARENT></Row>
    <Row><NAME>Personal Views</NAME><PARENT>Child</PARENT></Row>
    <Row><NAME>Raw eInfotree Table Views</NAME><PARENT>Supporting Views</PARENT></Row>
    <Row><NAME>Background Calculations</NAME><PARENT>Supporting Views</PARENT></Row>
    <Row><NAME>QC Data Views</NAME><PARENT>Supporting Views</PARENT></Row>
    <Row><NAME>Cell Culture Views</NAME><PARENT>Unit Operation Views</PARENT></Row>
    <Row><NAME>Purification Views</NAME><PARENT>Unit Operation Views</PARENT></Row>
    <Row><NAME>MFR Views</NAME><PARENT>Unit Operation Views</PARENT></Row>
    </Rowset>
    </Rowsets>
    Regards,
    Jeremy

  • Creating Tree Structure in VC

    Hello,
    Do you know how to create Tree like structure in Visual Composer. Tree should contain XML data coming from Web Service.
    Thanks,
    Prashant

    Hi Prashant,
    we have already a discussion about trees in VC [here|How to create Tree structure in Visual Composer;.
    Best Regards,
    Marcel

  • Loading in tree structure from arraylist

    Hi,
    I have a ArrayList contains xml file path like
    ArrayList al={"/folder1/sub1/sub11/1.xml",
    "/folder1/sub1/2.xml,
    "/folder1/test1/3.xml",
    "/folder2/sub2/4.xml",
    "/folder2/sub2/sub3/5.xml"}
    Note: 1.This arraylist objects are dynamically loaded.
    2.The objects in array list are not file system directory path like (e.g., C:/folder1/sub1/.....). Its string added in arraylist.
    using this arraylist i want to load it in jsp tree structure, like
    folder1
    |___sub1
    | |_sub11
    | | |__1.xml
    | |_2.xml
    |___test1
    |_3.xml
    folder2
    |
    |_sub2
    |___4.xml
    |___sub3
    |___5.xml
    Can any one help me with logic or predefined function in java to iterate each string array object and split parent and sub child folder and load it in tree.
    Edited by: manjunath_2284 on Aug 11, 2009 6:04 AM

    Create a Node class that has a name and Map<String, Node> as children.
    Iterate over the list, split each entry on "/", and place the parts that you get into the Node structure.

  • Can we change the Bill/Payment tree structure on Control central page?

    Can we change the Bill/Payment tree structure on Control central page to Bill/Payment Tree containing a single node for all A/R related activities for a specific bill period, in reverse chronological order. Basically the tree should look like
    + Bill - Date: 03-17-2010 Complete
    +++++ CR Note - Date: 05-04-2010 Complete
    ++++++++++ Pay - Date: 05-04-2010 Frozen
    + Bill - Date: 03-17-2010 Complete
    +++++ Pay - Date: 05-04-2010 Frozen
    I have tried changing controlCentralBPTree.xml but if I do that the tree is not expanding its just collapsed I m not able to expand.
    So do I need to change some other file to change the tree structure and look like above?

    Hello CHS.
    I tested your project but to change the label and has not worked.
    I tried running the Application Module and test the ViewCriteria, and show correctly the labels defined in control hint of bind variable.
    Again, I think the component af:query should do the same, but does not work.
    Any Oracle ACE Director some could verify this problem?
    thank you very much

  • Creating a tree structure in jsp- URGENT

    Hi,
    I need to create a tree structure using jsp. Can anybody help me out.
    Thanks in advance.

    to do what? to store what? be more specific dude. As a first suggestion use XML.

  • Tree Structure in JSP

    Hi,
    I have an xml file , my requirement needs me to display the xml file as a tree structure in jsp. The user should be able to make changes to tree. he can drag and drop the nodes and save the changes.
    I parsed the xml file and created a method that returns an arrayList of the immediate children given a node.I'am not getting how to proceed from there on.
    Can anyone provide me with any useful tips or code. I can use javascript css java(not swing).Please reply ASAP as I have to complete it soon.
    Thanks,
    Sabi

    Hi why dont you try the link below,
    basically its for menu u can change it,
    http://demo.raibledesigns.com/struts-menu/
    in the above link see the following hyperlink
    Expandable DHTML List Example - Shows Expandable DHTML list

  • Repeating XML in Tree Display

    I am using a Data Provider to load an xml file into a Tree
    structure. My xml file has repeating nodes of <container> and
    <product>, they are nested arbitrarily to reflect a proof of
    concept. When I load this file into a Tree structure I get
    repeating nodes, however in the original xml file, of course, these
    nodes do no appear.
    My call to load the xml into a XMLList through a Handler
    function is as follows:
    [Bindable]
    private var dishesDP:XMLList;
    private function dishesXMLHandler(event:ResultEvent):void
    dishesDP = event.result..container;
    The incorrect XML being loaded into my XMLList:
    <container title="Pants" description="These go on your
    legs">
    <container title="Jeans" description="They are blue and
    last a long time.">
    <product id="1" title="Levi's Denium" description="Nice
    normal blue jeans." price="17.50" image="image2.jpg"/>
    <product id="2" title="Abercombie" description="Did
    someone already wear these?? They got holes in them?" price="24.95"
    image="image2.jpg"/>
    </container>
    <container title="Slacks" description="Nice than jeans,
    wear them to work.">
    <product id="3" title="Dockers" description="Boring old
    people pants." price="14.95" image="image4.jpg"/>
    <product id="4" title="Old Navy" description="Cheap
    slacks, always got something slightly weird about them."
    price="18.75" image="image4.jpg"/>
    </container>
    </container>
    <container title="Jeans" description="They are blue and
    last a long time.">
    <product id="1" title="Levi's Denium" description="Nice
    normal blue jeans." price="17.50" image="image2.jpg"/>
    <product id="2" title="Abercombie" description="Did
    someone already wear these?? They got holes in them?" price="24.95"
    image="image2.jpg"/>
    </container>
    <container title="Slacks" description="Nice than jeans,
    wear them to work.">
    <product id="3" title="Dockers" description="Boring old
    people pants." price="14.95" image="image4.jpg"/>
    <product id="4" title="Old Navy" description="Cheap
    slacks, always got something slightly weird about them."
    price="18.75" image="image4.jpg"/>
    </container>
    The orginal (and correct) XML, existing in a remote file:
    <root>
    <container
    title="Pants"
    description="These go on your legs">
    <container
    title="Jeans"
    description="They are blue and last a long time.">
    <product
    id="1"
    title="Levi's Denium"
    description="Nice normal blue jeans."
    price="17.50"
    image="image2.jpg"
    />
    <product
    id="2"
    title="Abercombie"
    description="Did someone already wear these?? They got holes
    in them?"
    price="24.95"
    image="image2.jpg"
    />
    </container>
    <container
    title="Slacks"
    description="Nice than jeans, wear them to work.">
    <product
    id="3"
    title="Dockers"
    description="Boring old people pants."
    price="14.95"
    image="image4.jpg"
    />
    <product
    id="4"
    title="Old Navy"
    description="Cheap slacks, always got something slightly
    weird about them."
    price="18.75"
    image="image4.jpg"
    />
    </container>
    </container>
    The actually application link can be provided if necessary.
    Thank you for your time,
    Ryan

    Hi Charu,
    Go through below sample.
    Link: [ALV TREE|http://wiki.sdn.sap.com/wiki/display/ABAP/CallFMtogeneratealvtreeanddealwithuseraction].
    Regards,
    Maruthi

  • Dynamically Loading xml in tree  control

    Hi I am new to flex i need to load the following xml into tree
    <?xml  version="1.0" encoding="utf-8" ?>
    - <catalog>
    - <product>
    <name>laptop3</name>
    <price>"1256"</price>
    <qty>"45"</qty>
    </product>
    - <product>
    <name>"CAR"</name>
    <price>"45000"</price>
    <qty>"7"</qty>
    </product>
    - <product>
    <name>"Laptop2"</name>
    <price>"450011"</price>
    <qty>"7022888"</qty>
    </product>
    - <product>
    <name>"Laptop"</name>
    <price>"45000"</price>
    <qty>"70"</qty>
    </product>
    - <product>
    <name>"Laptop2"</name>
    <price>"45000"</price>
    <qty>"7022"</qty>
    </product>
    - <product>
    <name>"Laptop2"</name>
    <price>"45000"</price>
    <qty>"7022888"</qty>
    </product>
    </catalog>
    I am unable to load the exact xml structure ...
    Please help me
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:HTTPService id="srv" url="http://localhost:8080/SampleWebApp/test.jsp"/>
        <mx:DataGrid dataProvider="{srv.lastResult.catalog.product}" width="100%" height="100%"/>
        <mx:Tree labelField="@val" width="201" height="100%" showRoot="true"
        showInAutomationHierarchy="true" id="machineTree" dataProvider="{srv.lastResult.catalog.product}"></mx:Tree> 
        <mx:Button label="Get Data" click="srv.send()"/>
    </mx:Application>
    I am able to load into data grid , but not in tree help me

    The same as you have but with embeded XML.
    <mx:XML id="tstData">
    <catalog>
    <product>
    <name>laptop3</name>
    <price>"1256"</price>
    <qty>"45"</qty>
    </product>
    <product>
    <name>"CAR"</name>
    <price>"45000"</price>
    <qty>"7"</qty>
    </product>
    <product>
    <name>"Laptop2"</name>
    <price>"450011"</price>
    <qty>"7022888"</qty>
    </product>
    <product>
    <name>"Laptop"</name>
    <price>"45000"</price>
    <qty>"70"</qty>
    </product>
    <product>
    <name>"Laptop2"</name>
    <price>"45000"</price>
    <qty>"7022"</qty>
    </product>
    <product>
    <name>"Laptop2"</name>
    <price>"45000"</price>
    <qty>"7022888"</qty>
    </product>
    </catalog>
    </mx:XML>
    <mx:Tree labelFunction="treeLabel" width="201" height="100%" showRoot="true"
        showInAutomationHierarchy="true" id="machineTree" dataProvider="{tstData.product}">
    But it doesn't matter.
    try to debug. Add this
                   [Bindable]
                private var treeData:XMLListCollection;
                public function onResult(event:ResultEvent):void
                treeData = new XMLListCollection(XML(event.result).product); // debug here to see what you get and what is a type for this data
              <mx:HTTPService id="srv"  url="http://localhost:8080/SampleWebApp/test.jsp" result="onResult(event)"/>
    And treeData as a dataSource for Tree.

  • Required info on tree structure.

    Hi All,
    Can any body help me in displaying data in a tree structure in PDA.
    We have a requirement where the data comes with parent & child relationship, each child may or may not be a parent and the tree may drill more than 10 levels.
    when user clicks on the node all the subsequent childs need to be displayed and on the second click the tree need to be collapsed to that node level.(this should be similar to some of the data in sap ex: functional locations)
    IS there a component in MI / MAM application to acheive the same else what is the possible way for this.
    Your help will be well appriciated.
    Thanks & Regards,
    Sai.K. K

    Hi Sai,
    well, the answer is unfortunally a NO in the first place.
    MI is based on standard JSP and AWT functionality - up to Version 7.0 - and both runtime environments do not support that stuff on PDA.
    If you run the APP on Lapop only, you could build something like that with Java Script in HTML or extend the functionality there with some Add ons externally available that can be filled by normal XML. But this is outside the usual MI scope, it depends on your creative level. WebDynpro on the other side supports you with a tree view as I remember, so this could be an option - but again, only on Laptop.
    The question is: why do you not split the tree view to several pages? I have no idea about the amount of data you need to carry with you, just in the first place already. Usually tree view could mean a lot of data and this could end up in a long waiting time just to display the first page. Perhaps it is an option to show the actual level of the tree and if the user selects on item, then this item is added to the path (how has he got there) and the next level is displayed in the screen. Pretty much like the Windows Workplace, where every klick on a folder opens a new window with just the info of that window. Performance wise tis could perhaps be the better option.
    Does this help?
    Regards,
    Oliver

Maybe you are looking for

  • Option 1- Slow speed - order not completed ??

    Hi I was previously on another BT Package and upgraded to Option 1. Previously I was getting speeds up to 5.9. I have wireless and hard wired devices and the speed was consistent with the hard wired device typically 1 Mbps above the wireless device (

  • Display of 0FISCPER in a Query

    Greetings all. I'm busy with an upgrade from 2.1 to 3.5 I've finished doing the upgrade in our test environment and currently I'm testing my queries, loads etc. I've discover that my Time characteristics are not displaying the same anymore.  The prob

  • Slow Playback Adobe Audition CS5.5 - not sample rate setting error!

    I'm currently using Windows 7 and Adobe Audition CS5.5 build 1815. Soundcard is RME Digi96 Pad. Ok its an old card and the drivers date from 2005. In Adobe 3.1 and CS5.5  I get slow, around half speed, playback at 44k and 96k sample rates. YES the pr

  • I have Windows 8.1. Just set up printer for HP Photosmart C4280. How to set up wireless?

    I use Windows 8.1.  I have installed my printer, HP Photosmart C4280 All-in One.  It will print from my windows program but not from the internet.  I don't have WiFi.  Any suggestions?  I'm not very computer literate so please keep it simple.  Thank

  • Runtime gone wrong

    Runtime.getRuntime( ).exec ("cmd.exe /k " path " +set cl_playintro 0 +password \"" +pass +"\" +connect " ip ":" +port); Hopefully you can see what I'm trying to do here... I've stored a few variables in strings which I'm trying to call to execute a p