How to output a hierarchical tree structure of existing data in XML using XSU

I have data in a table where the rows have a parent-child relationship with each other. If one were to use the 'connect by' clause, one could see the tree (lets say some sort of a hierarchical family tree). If I were to use the XML-SQL Utility's PL/SQL API, how would it be possible to output the family tree in XML ie the XML should be such that each child element is nested within its parent element only.
Thanks for the help.
Jeet
null

XSU doesn't follow foreign key links like this, but our DBXML package (some sample code written in PL/SQL that we published a couple years back) does do this.
See: http://technet.oracle.com/tech/xml/info/index2.htm?Info&plsxml/xml4plsql.htm

Similar Messages

  • 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

  • How can I create a Tree  Structure in java ??

    Hi,
    I want to create a tree structure(objects hierarchy) using java language. Is there any API method for this ?
    Can any one please give me a hint or suggestion how I can do this ??
    Thanks for the help in advance.

    Do you mean graphically?
    You can use a TreeSet or TreeMap if you just want to use tree structures.
    Kaj

  • How do we create Hierarchical tree??

    Can I get help on creating hirerchical tree with detailed description ?? I tried basing hierarchical item on query but it didn't work.Do i need to specifically give code for populating it ??
    Also I need help on basing it on Record Group ??
    Is there any rule for having specific no of columns for a tree ??

    You can create Hierarchical Tree in two ways.
    One using "connect by prior" and another
    by Adding columns and row to record group at run time.
    If your table has Self reference Key then
    you can create using connect by prior.
    Otherwise you have to go for second one.
    Go and check the navwiz.fmb in oracle demo files.
    Following example is from navwiz.fmb
    (open navwiz.pll and then check refresh_tree)
    In this example they used both.For Emp they used connect by prior.
    PROCEDURE refresh_trees(p_view VARCHAR2) IS
    cursor cursor_dept is
    select dname, deptno
    from dept
    order by dname;
    cursor cursor_emp(p_dno number) is
    select ename, empno
    from emp
    where deptno = p_dno
    order by ename;
    v_i number;
    v_ignore number;
    rg_emps recordgroup;
    rg_depts recordgroup;
    v_init_state groupcolumn;
    v_level groupcolumn;
    v_label groupcolumn;
    v_icon groupcolumn;
    v_value groupcolumn;
    begin
    if p_view = 'EMP' then
    --the emps hierarchy
    rg_emps := find_group('EMPS');
    if not id_null(rg_emps) then
    delete_group(rg_emps);
    end if;
    rg_emps := create_group_from_query('EMPS',
    'select 1, level, ename, NULL, to_char(empno) ' &#0124; &#0124;
    'from emp ' &#0124; &#0124;
    'connect by prior empno = mgr ' &#0124; &#0124;
    'start with mgr IS NULL');
    v_ignore := populate_group(rg_emps);
    ftree.set_tree_property('navigator.nav_display', ftree.record_group, rg_emps);
    else
    --the organization
    rg_depts := find_group('DEPTS');
    if not id_null(rg_depts) then
    delete_group(rg_depts);
    end if;
    rg_depts := create_group('DEPTS');
    v_init_state := add_group_column(rg_depts, 'init_state', number_column);
    v_level := add_group_column(rg_depts, 'level', number_column);
    v_label := add_group_column(rg_depts, 'label', char_column, 40);
    v_icon := add_group_column(rg_depts, 'icon', char_column, 20);
    v_value := add_group_column(rg_depts, 'value', char_column, 5);
    v_i := 1;
    for deptrec in cursor_dept loop
    add_group_row(rg_depts, v_i);
    set_group_number_cell(v_init_state, v_i, 1);
    set_group_number_cell(v_level , v_i, 1);
    set_group_char_cell (v_label , v_i, deptrec.dname);
    set_group_char_cell (v_icon , v_i, NULL);
    set_group_char_cell (v_value , v_i, to_char(deptrec.deptno));
    v_i := v_i + 1;
    for emprec in cursor_emp(deptrec.deptno) loop
    add_group_row(rg_depts, v_i);
    set_group_number_cell(v_init_state, v_i, 1);
    set_group_number_cell(v_level , v_i, 2);
    set_group_char_cell (v_label , v_i, emprec.ename);
    set_group_char_cell (v_icon , v_i, NULL);
    set_group_char_cell (v_value , v_i, to_char(emprec.empno));
    v_i := v_i + 1;
    end loop;
    end loop;
    ftree.set_tree_property('navigator.nav_display', ftree.record_group, rg_depts);
    end if;
    My query******
    procedure refresh1 is
    v_i number;
    v_ignore number;
    Rg_Menus recordgroup;
    rg_depts recordgroup;
    Begin
    Rg_Menus := find_group('MENUS');
    If not id_null(Rg_Menus) then
    delete_group(Rg_Menus);
    End If;
    Rg_Menus := create_group_from_query('MENUS',
    'select 1, level, item_name, NULL, item_id ' &#0124; &#0124;
    'from Item_all '
    &#0124; &#0124;' where Item_id in (select Item_id from Item_access_all where role_id in
    (select role_id from org_access_all where user_id =
    (select gsp_user_id from users_all where upper(user_name) = upper(USER))
    and code = :global.code) )
    and item_id not in (select item_id from item_Exception where Code = :Global.Code)' &#0124; &#0124;
    'connect by prior item_name = main_name ' &#0124; &#0124;
    'start with item_name = ''MAIN''');
    v_ignore := populate_group(Rg_Menus);
    ftree.set_tree_property('tree_blk.tree_menu', ftree.record_group,Rg_Menus);
    Exception
    When Others then
    Bell;
    Message('You cannot Access any menu item...');
    Raise Form_trigger_Failure;
    End;
    viji.
    null

  • How to Display Tree structure in Grid Data ?

    Hi Friends.,
                      I am Using tree control to get the data from database dynamically.
                        Now i use to selected (node or folder) will be display in grid in tree structure with using panel.   any Example coding....?
    Any One Help me.....
    With Regards.,
    Lingu..,

    i've posted some examples to Tree structures in a Datagrid in a topic a few below this one
    http://forums.adobe.com/thread/569070?tstart=0

  • How to Integration of a tree Structure in a table CE 7.1 (not in 2004s)

    Hi Experts,
    I couldn't find any column type like "MasterColumn of the type TreeByNestingTableColumn". 
    I am able creation application in 2004s not in CE 7.1.
    Please any one help me to solve this problem.
    Regards,
    Satya.

    Hi
    what erectly the problem is ?
    Things are same in CE 7.1 also.
    Check this [thread|Help on WebDynpro - Tree Structure in a Table;
    BR
    Satish Kumar
    Edited by: satish jhariya on Mar 3, 2009 11:35 AM

  • How can I display a  tree structure?

    I would like to display a tree stucture, but don't want to use the JTree look. I would like the tree to look something like the following (but with boxes around the names, and arrows point from children to parent):
                --- child1
    root ---|
                                    --- child3
                --- child2 --|
                                    --- child4Is there a class already out there I can implement and use for this? Or do I basically have to start from scratch?

    It strikes me that JTree should have a setHorizontalLayout() feature... But scratch never was a bad place to start, was it?

  • Hierarchical tree and interacting with data block

    I have a hierarchical tree that is used to pick records that are shown in another data block. I have a list item in the data block that changes the arrangement of nodes in the hierarchy. My problem is that after the update, I select the node, but the wrong data shows up in the other data block (eg. node x is selected, x becomes a child of y, the data for y still appears in the data block even though node x is selected in the tree). There seems to be something wrong with my triggers, but I can't figure out what.
    Here are the triggers that I am using.
    In the tree block, tree item:
    -WHEN-TREE-NODE-SELECTED
    set_block_property(v_data_block, default_where, 'global_id = ' &#0124; &#0124; v_org);
    go_block(v_data_block);
    execute_query;
    In the data block, list item
    -WHEN-LIST-CHANGED:
    -- find the tree node and select it
    node := Ftree.Find_Tree_Node(...)
    Ftree.set_tree_selection(v_tree,node,Ftree.SELECT_ON);
    -- update the data block to show data from the selected node
    set_block_property('GREENPAGES_DIR', default_where, 'global_id = ' &#0124; &#0124; :greenpages_dir.global_id);
    go_block('GREENPAGES_DIR');
    execute_query;
    Thanks for your help.

    hi
    i didn't try doing it.. i assume the the reasons can be:
    1.check the value of the variable 'v_org' because 'w-t-n-s' trigger fires twice..
    2. 'w-t-n-s' trigger is not firing eventhough u select it through ur code in the list item trigger.. if not firing, use execute_trigger('w-t-n-s') and remove the last set of code (update section) from the list item trigger..(assuming 'GREENPAGES_DIR' = v_data_block)
    hope this helps u
    ajith

  • How to save form data as XML using Reader XI

    Dear all,
    I have designed a form using live cycle designer 9 and activated the form extensions using Acrobat X Pro.
    The form includes an email send button.
    Our clients uses the Reader X and XI.
    Using Reader X the pressing of the button will open a dialog box asking the user to send the form/form data using the default email client
    OR
    one can save the form data as xml file on the local machine and attach it later.
    However, using Reader XI there is no such possibility of saving the data as XML. One can just chose between the default email client or another email account.
    I tried even a button using javascript xfa.host.exportData("",0); but nothing. In fact the button shows no function at all.
    What do I wrong?
    Does anybody has a hint please?
    Thanks in advance.
    gersti

    I'm pretty impressed of Adobe and their stuff (I do NOT refer to the community), how helpful they are.
    Perhaps I didn't understand  the meaning on the offical customer support website, stating:
    The best way to contact us...  
    Ask our experts 
    Our community and staff are at your service 24/7
    Even worst, their is a similar question from 25/09/2013 (http://forums.adobe.com/message/5711946#5711946) and no feedback form Adobe stuff at all.
    Great service guys!
    Thanks a lot!

  • How can I truncate the time zone from a Date object without using String?

    Does anyone know how to truncate the time zone portion of a Date object and maintain the object as Date, NOT String?
    I just need the date, i.e., 05/02/2008 as a Date.
    Thanks.
    JDev1

    Although you haven't said so, I expect you must be having some problem with that?
    My wild guess: the server is creating a Date object and setting its time component to zero (midnight). Of course since Date doesn't have a timezone, that would be midnight in the server's timezone. Then you are interpreting that date as if it were in your timezone, and since you are west of the server, it appears to be 11 PM or 9 PM or something on the day before.
    What we do is to send our timezone to the server and tell the server to use it when creating the Date object. Alternatively, when formatting the Date object you could use a SimpleDateFormat with the server's timezone applied. There are no doubt other solutions that could be provided if we had a description of your problem.

  • How to Display Heading for TREE Structure (report)

    hi,
         tell me how display the heading for the TREE Report.
    With Regards,
    Shakthi Raj N.

    Hi,
    If you are using object oriented approach for developing the Tree report, then you can use below shown example for creating header for the report.
      first create tree control
      CREATE OBJECT TREE1
        EXPORTING
            PARENT              = G_CONTAINER_OBJECT
            NODE_SELECTION_MODE = CL_GUI_COLUMN_TREE=>NODE_SEL_MODE_SINGLE
            ITEM_SELECTION      = ''
            NO_HTML_HEADER      = ''
            NO_TOOLBAR          = ''
        EXCEPTIONS
            CNTL_ERROR                   = 1
            CNTL_SYSTEM_ERROR            = 2
            CREATE_ERROR                 = 3
            LIFETIME_ERROR               = 4
            ILLEGAL_NODE_SELECTION_MODE  = 5
            FAILED                       = 6
            ILLEGAL_COLUMN_NAME          = 7.
      CLEAR GT_HEADER.
      GT_HEADER-TYP = 'H'.
      GT_HEADER-INFO = 'Output'.
      APPEND GT_HEADER.
      CLEAR GT_HEADER.
      GT_HEADER-TYP = 'S'.
      GT_HEADER-KEY = 'Display'.
      GT_HEADER-INFO = 'Report'.
      APPEND GT_HEADER.
    then create empty tree-control
      CALL METHOD TREE1->SET_TABLE_FOR_FIRST_DISPLAY
              EXPORTING
                   IS_HIERARCHY_HEADER  = G_HIERARCHY_HEADER
                   I_BACKGROUND_ID      = 'ALV_BACKGROUND'
                   IT_LIST_COMMENTARY   = GT_HEADER[]
              CHANGING
                   IT_OUTTAB            = GT_SPFLI[]    "empty table
                   IT_FIELDCATALOG      = GT_FIELDCAT_LVC[].
    In this way header can be given for Tree report.
    Hope this answers your query.
    Regards,
    Brajvir

  • How do I create a physical structure in the data dictionary ?

    Hi all,
    How can I create a data structure using ABAP ? (prefrebly by using a class)
    I want to create a physical data dictionary structure, just like using se11 (data type -> structure).
    Thanx ahead.
    -Tonni

    To create a dynamic table at runtime I use the code below.
    DATA: gt_fcat          TYPE slis_t_fieldcat_alv,
          gs_fcat          LIKE LINE OF gt_fcat,
          gt_fieldcat      TYPE lvc_t_fcat,
          gs_fieldcat      LIKE LINE OF gt_fieldcat. 
    CLEAR: gt_fieldcat, gt_fieldcat[], gs_fieldcat.
      gs_fieldcat-fieldname     = 'SIGN'.
      gs_fieldcat-ref_field     = 'XMSTU'.
      gs_fieldcat-ref_table     = 'T007A'.
      gs_fieldcat-fix_column    = space.
      gs_fieldcat-no_zero       = space.
      APPEND gs_fieldcat TO gt_fieldcat.
      gs_fieldcat-fieldname     = 'OPTION'.
      gs_fieldcat-ref_field     = 'SEQN'.
      gs_fieldcat-ref_table     = 'T159W'.
      gs_fieldcat-fix_column    = space.
      gs_fieldcat-no_zero       = space.
      APPEND gs_fieldcat TO gt_fieldcat.
    Create a new Table
      CLEAR : gt_range2.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = gt_fieldcat
        IMPORTING
          ep_table        = gt_range2.
    Create a new Line with the same structure of the table.
      ASSIGN gt_range2->* TO <range>.
    To create a structure like this table I use
      CREATE DATA gs_range2 LIKE LINE OF <range>.
      ASSIGN gs_range2->* TO <range1>.

  • How to find out if a structure already exists in DDIC

    Hi all,
    I want to find out if a structure or table type already exists in the DDIC. I intend to use the DDIF_TABL_GET function module and catch the exception raised but I am not sure if this 'illegal input'  exception is only raised if a structure does not exist in DDIC. Is it the right way or is there a function module or static class method which can return me this info stg. like DDIC_OBJECT_EXISTS or not . I have the same problem for the table types too, but I think the solution must be similar...
    Kind Regards,
    Sükrü Ilker Birakoglu

    Hi all,
    Thank you for your answers. I also found an alternative way for solving the problem. If you call the function module DDIF_TABL_GET with the state parameter set to 'M' (get the object regardless of its state(active, new)), the export parameter GOTSTATE shows us if the object in DDIC exists or not(if this parameter is space, then the object does not exist).
    Kind Regards,
    Sükrü Ilker Birakoglu

  • How to Automatically Populate fields from Style no.--All data in XML- 2nd Request

    To start with i am a noob in Livecycle, and zero knowledge in coding...<br />I basically want to create 1 dropdown list (syle #) which shall automatically refer to xml and populate different fields (qtyperinner, buyer etc.)<br /><br />Here's my XML-<br /><br /><?xml version="1.0" encoding="utf-8" standalone="yes"?><br /><br /><document><br /><row><br />150833<br /><QtyPerMaster>24</QtyPerMaster><br /><QtyPerInner>6</QtyPerInner><br /><VolofMaster>0.039</VolofMaster><br /><Buyer>Fred Meyer</Buyer><br /></row><br /><row><br />87102<br /><QtyPerMaster>24</QtyPerMaster><br /><QtyPerInner>4</QtyPerInner><br /><VolofMaster>0.034</VolofMaster><br /><Buyer>Fred Meyer</Buyer><br /></row><br /><row><br />821011<br /><QtyPerMaster>50</QtyPerMaster><br /><QtyPerInner>50</QtyPerInner><br /><VolofMaster>0.053</VolofMaster><br /><Buyer>Insource</Buyer><br /></row><br /><row><br />110609<br /><QtyPerMaster>12</QtyPerMaster><br /><QtyPerInner>2</QtyPerInner><br /><VolofMaster>0.022</VolofMaster><br /><Buyer>Indigo</Buyer><br /></row><br /><row><br />110608<br /><QtyPerMaster>24</QtyPerMaster><br /><QtyPerInner>6</QtyPerInner><br /><VolofMaster>0.024</VolofMaster><br /><Buyer>Indigo</Buyer><br /></row><br /><br /><row><br />150785<br /><QtyPerMaster>12</QtyPerMaster><br /><QtyPerInner>2</QtyPerInner><br /><VolofMaster>0.055</VolofMaster><br /><Buyer>Pier 1</Buyer><br /></row><br /></document><br />_______________________________________________________<br /><br />Have already managed to create dropdown with style number...and it works!!<br />(and have connected the XML with form properties as well as data binding)<br />please advice how to link/bind style # field with the rest of the text boxes to generate data underneath that particular style number from the XML.<br />it could very well be possible that my XML is written wrong (without heirachy or something)...if so also advice how that needs to be with an example...kindly make sure to advice in great detail as i would'nt understand otherwise.<br /><br />Question 2:- Based on the "style #" selection i want an image to be populated from C: (it should search the whole drive to find filename/style number) Please advice.<br /><br />Lastly i have already looked at the Purchase Order sample PDF which came with LiveCycle..and it doesnt seem to be of much help.<br />Thanks in Advance-<br />AK Dolven

    Hi Judy,
    I think you need to programatically set the layout and copies options for your XML publisher concurrent program using FND_REQUEST.ADD_LAYOUT before calling FND_REQUEST.SUBMIT_REQUEST.
    Thanks
    Shailendra

  • How to rollback RBS and what happens to existing data

    Let's say I am using Remote Blog Storage (RBS) in one of my content database and I decide not to use anymore.
    1. How can I roll back RBS?
    2. What will happen to my data and how can I migrate it from RBS to how SharePoint/SQL Server stores it normally in database?

    There's a few blogs around with steps such as this one:
    https://alipka.wordpress.com/2010/06/19/how-to-disable-rbs-in-sharepoint-2010/
    I'd tackle it in several steps.
    Make sure that no new content is being externalised
    Move existing content back into the database
    Remove old connections
    Or i'd just try doing backup and restore operations for site collections to clean databases that don't have the RBS configured.

Maybe you are looking for