Fill the table of the hierarchy tree of XML data

Hi experts

I have an XML file and I want to create a hierarchy tree in a single table.
Say the following XML:

< Note >
< to > < /pour > Mary
< from > John < / from >
< title > call < / section >
< body > don't forget me this weekend < / body >
< / note >

Expected to generate these documents:

TAG ID PARENT_ID VALUE
Note 1 null null
2 1 Marie
3 1 John
4 1 position of reminder
5 1 body remember me this weekend

How can I achieve this?

Thanks in advance
Oscar

Hi Oscar,.

These discussions should be of interest to you:

{: identifier of the thread = 2210708}

{: identifier of the thread = 2195072}

Tags: Database

Similar Questions

  • The hierarchy tree tutorial

    Hello dear,

    Please someone help me or share a link to the development of the hierarchy tree on a form.

    I need the following specifications in development.

    that populate database table.
    Add a node that will be recorded in table
    remove a node that erases the precise recording of table
    update a node that update the database table.


    I'll be very thank you all in advance.

    Kind regards

    Zafar Iqbal

    Hello

    It is a starting point


    François

  • How to use record group to insert data into the hierarchy tree?

    Hello

    I had a hierarchical tree in my block and I want to use the record group to display
    in the hierarchy tree, call david_tree. He did work for the code I try below
    and I think it might be that the create_group_form_query was wrong? or miss an order?


    DECLARE
    htree;
    rg_data RECORDGROUP;
    v_ignore NUMBER;
    BEGIN
    htree: = Find_Item ('tree_block.david_tree');

    rg_data: = CREATE_GROUP_FROM_QUERY ('rg_bank',
    "select name, short_name".
    || "from css_banks");

    -Fill the record with data.

    v_ignore: = POPULATE_GROUP (rg_data);

    -Transfer the data from the record group to the hierarchical
    -tree and bring it to display.

    FTREE. SET_TREE_PROPERTY (htree, FTREE. (RECORD_GROUP, rg_data);

    END;


    Thank you


    David

    David,
    You get an error with your code? Looks like you took your example code help Forms. I don't really see a problem with the code, but the forms example gives an example of how create the record group used by the HTree so the Receiver General may be the cause of the problem. When I used the HTree, I used the FTREE. Procedure ADD_TREE_DATA to fill the tree. When I started working with HTree I created a wrapper package to simplify the process. You can watch how I work with the HTree in a demo that I published called: forms and how to: create a shape of the HIERARCHICAL tree.

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • Order by in the hierarchy tree

    HelloW All


    My request for the hierarchy tree is

    SELECT 1, LEVEL, name. ' ('| to_char (ID) |')    ', ", to_char (id)+.
    FROM py_emp+.
    CONNECT BY PRIOR id = start catagory_id with+.
    id in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,+)
    * 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35, *.
    * 36.37.38.39.40.41). *


    Its fine to work, but the hierarchy tree is not stopped by Id

    What can I do?

    2nd I want to start with the id in 1,2,3 do not enter from 1 to 1000 to continue automatically continue


    Concerning


    Wasim Ismail

    1. you can use

    BROTHERS AND SŒURS ORDER BY ID

    2. I do not understand this requirement

  • Colorful of the hierarchy tree

    Hello
    This is the first thread write. I searched your discussions for 'how to display the hierarchy tree in forms 10g with different colors and different fonts for different nodes weight '. But I found nothing.
    Looking forward hopefully to your answers.

    Hello

    Forms provides special not integrated to manage the coloring of a tree.
    The only way would be to do it through the Java code.

    François

  • the hierarchy tree-shaped 10g

    Dear member.

    I am a beginner. and want to know about how to make hierarchical form
    I use suit developer 10g.



    Thank you


    Mustafa
    Lahore, pakistan

    Mustafa,

    the way you marked the node_id and parent_node_id in the two tables, it is at the level of the form. or that it's a bit confusing to me, I have to apply this form of ht to another schema.

    Yes, I create Federal Archives which fills the HT in the trigger once - new - form - Instance (WNFI). You can fill a HT of anywhere, but I use the WNFI to ensure that the tree is completed when the form is loaded.

    To add a node "Grandson" to your tree, you simply change the trigger WNFI and add a loop for these nodes. Use your data for example, the code in the WNFI might look like this (untested):

    DECLARE
       CURSOR c_comp IS
          SELEC T compcode, name
            FRO M company;
    
       CURSOR c_div (p_comp NUMBER) IS
          SELEC T div_id, div_name, dept_id
            FRO M s_div
          WHER E compcode = p_comp;
    
       CURSOR c_dept (IS
          SELEC T dept_id, dept_name
           FRO M s_dept
         WHER E dept_id = p_dept;
    
       n_level NUMBER := 1;
       n_row NUMBER := 1;
       rg_id  RECORDGROUP;
       node Ftree.Node;
    BEGIN
       Tree_Control.v_item_name := 'MY_TREE_DATA.MY_TREE';
       rg_id := Tree_Control.Create_RG;
    
       <>
       FOR r_comp IN c_comp LOOP
          -- Add Parent Company
          Tree_Control.ADD_RG_ROW(rg_id, ftree.collapsed_node, n_row,
                  n_level, r_comp.name, null, r_comp.compcode);
          n_row := n_row + 1;
          n_level := n_level + 1;
    
          -- Add any child Department records
          <>
          FOR r_div IN c_div(r_comp.compcode) LOOP
             Tree_Control.ADD_RG_ROW(rg_id, ftree.collapsed_node, n_row,
                  n_level, r_div.div_name, null, r_div.div_id);
             n_row := n_row+1;
    
             -- Now, add any Grandchildren
            <>
            FOR r_dept IN c_dept(r_div.dept_id) LOOP
               Tree_Control.ADD_RG_ROW(rg_id, ftree.collapsed_node, n_row,
                   n_level, r_dept.dept_name, null, r_dept.dept_id);
            END LOOP grandchild;
          END LOOP child;
       END LOOP parent;
    
       ftree.Add_Tree_Data(Tree_Control.v_item_name, ftree.ROOT_NODE,
                       ftree.PARENT_OFFSET, ftree.LAST_CHILD,
                       ftree.RECORD_GROUD, rg_id);
    END;
    

    You will still need to modify the Create_RG function in the Tree_Control package to support the changes described above, but this code example should help you get started.

    Craig...

  • Is there a way to the highest point in the hierarchy tree darker?

    It is the highest point that you see when a field in the tree is selected. The highest point is STILL very low, and the only way to see it is by looking at an angle.

    Hello

    This came before as the subject last year.

    You can change the color of items selected in the hierarchy. However it is a Windows setting in Control Panel.

    Have a look here: http://forums.adobe.com/message/2603870#2603870.

    Good luck

    Niall

  • Fill the third variable according to date

    Dear all,

    In my database, visitdate and the variable pat_id is here. I want to fill the third variable one that went first, and then we V1, then V2, V3, V4 etc...
    If the patient went to the same date and same type of visit must be here (e.g.P004)


    type of visitdate pat_id
    P001 23/03/2010 V1
    27/05/2012 V3 P001
    P001 07/27/2010 V2
    P002 05/11/2010 V1
    P002 05/09/2009 V3
    P003 07/27/2010 V1
    P004 23/03/2010 V1
    P004 23/03/2010 V1
    P004 07/27/2010 V2
    P004 07/27/2011 V3


    Thanks in advance for your help

    Hello

    This sounds like a job for the analytical DENSE_RANK function.

    SELECT    pat_id
    ,       visitdate
    ,       'V' || TO_CHAR ( DENSE_RANK ()
                                 OVER ( PARTITION BY  pat_id
                                     ORDER BY         visitdate
                            )
                    )  AS type
    FROM      table_x
    ORDER BY  pat_id     -- statement ORDER BY clause is optional
    ,            visitdate
    ;
    

    If you would care to post CREATE TABLE and INSERT instructions for the sample data, and then I could test it.
    See the FAQ forum {message identifier: = 9360002}

    Published by: Frank Kulash on 29 January 2013 09:19

  • Best way to display a report of the hierarchy tree to APEX 4.2

    I have a hierarchical query spans four levels over two tables.  The application works very well and also includes columns hierarchical sum (i.e. the parent displays the sum of all children) using functions.

    I wonder what is the best way to view these data for users?

    At the moment I think I would have a collection now my connection with the edition special 'show' column.  Then I would include HTML to define values correct show/hide and refresh the report when you click on a node.  In my view, this would probably work, but may not be the best way.

    I disassembled my request for necessary columns (no column of the sum) and the tree APEX regions work well for this.  Y at - it a plugin alternative jquery or anything that people with what will give me the directory structure 4.2 native while allowing me to display additional columns with links?

    If I need to provide more info let me know!

    LSDev wrote:

    I'm going to use today to test these ideas, and if they don't work I'll go with the classic report hack, I thought.

    AEC: I'll try the plugin and report back on the question if I can get the links to work.

    The plugin code is clear and simple. However, the links generated HTML text in the query as:

    ...
    '' || apex_escape.html(ename) || '' employee
    ...
    

    does not work out of the box as the plug-in is escaping in HTML output column values:

        -- Render all other columns
        FOR j IN 3 .. l_value_list.count
        LOOP
          sys.htp.p('' || sys.htf.escape_sc(l_value_list(j)(i)) || '');
        END LOOP;
    

    This can be changed to allow the links:

      -- Render all other columns
        FOR j IN 3 .. l_value_list.count
        LOOP
         IF l_value_list(j)(i) not like '' || l_value_list(j)(i) || '');
        END LOOP;
    
  • Button gif icon not displayed but the icon of the hierarchy tree.

    Developer and oracle 10 g database

    I was working on windows Xp and oracle10g on button icon and HTree worked very well.
    After that, I installed windows 7 pro, in this icon of the window was not displayed.
    now, even once, I installed windows Xp and run my existing form there is a problem I m facing Htree menu does not display icon but button is displayed.

    I have set all parameters for the icon (gif file).
    define formsweb jar file
    recreated jar file *.gif files.
    Jar -cfv icons.jar *.gif
    copy jar file into java folder
    edit registry 
    edit regstry.dat
    
    it is record group
    
    
    SELECT -1, LEVEL, NODE, icon,S_ID  FROM MENU
    CONNECT BY PRIOR S_ID=S_NO
    START WITH S_ID=1
    order by to_number(s_id)
    
            -1      LEVEL NODE                 ICON                 S_ID 
    ---------- ---------- -------------------- -------------------- -----
            -1          1 MENU                 menu                 1    
            -1          2 SETUP                profile              2    
            -1          3 Location             location             3    
            -1          3 Department           public               4    
            -1          3 Designation          info                 5    
            -1          3 Shift                abc                  6    
            -1          3 Divisions            house                7    
            -1          3 Transporter          Trans                8    
            -1          3 Bank                 bank                 9    
            -1          3 Leave_Type           hospital             10   
    10 rows selected
    I checked again all the icons in the extract with Winrar jar file

    Published by: 867210 on February 7, 2013 23:46

    Edit the Registry.dat file

    First edit this default path and stop OJ4J  and start and run form.
    default.icons.iconpath=
    
    if not working then try this
    default.icons.iconpath=icons
    

    concerning
    -Ahmed

  • Filling the first page second page data

    Hi all

    I developed a demo.cfm page that has the grid table. I display the table grid of database data.
    Each row of the table in the grid has a button change. Click on edit button redirects to another page that contains text fields whose names are similar to grid table headers.

    As soon as the user clicks on a particular line of the grid edit table button. Button clicked line values must be entered in the second text of page fields.

    Ex: Grid table demo.cfm contains the following data
    Name Age Sex Address

    1. 22 M Edit XYZ xyz

    When the user clicks Edit button form is submitted and in the second page text boxes him clicked on change line of link values need to be filled.
    Here we clicked on the first edit of a line button then second page text fields are filled with the values of line first.

    NAME: xyz
    Age: 22
    Sex: M
    Address: xyz

    Similarly, regardless of the line edit button than row data must be completed on the second page of the screen areas.


    How to solve this problem.

    Can someone help me solve this problem.

    Change the link must go to the second page details specific to this line.

    Do something like:


    Edit

    Then, in your form on the second page, you fill in the form as:



    Clearly this all depends on your so-called fields etc (I guessed right) and also, you will need to check some variables exist or not while it throws an error when they are not - but that's a different question.

    Good luck.

  • SQLLDR: How to fill the empty columns with specific data by default?

    Hello

    We are 11G

    Here is a complete example:

    (1) the definition of the table:
    create table IMPORT_PRJ_TIMESHEETS
    (
      RESSOURCE_CODE VARCHAR2(20),
      REFERENCE_DATE VARCHAR2(20),
      STATUS         VARCHAR2(20),
      PROJET_CODE    VARCHAR2(50),
      TACHE_ID       VARCHAR2(100),
      TACHE_DESC     VARCHAR2(250),
      RAF            NUMBER,
      JOUR1          NUMBER,
      JOUR2          NUMBER,
      JOUR3          NUMBER,
      JOUR4          NUMBER,
      JOUR5          NUMBER,
      JOUR6          NUMBER,
      JOUR7          NUMBER,
      IMPORT_DATE    DATE
    );
    (2) the CTL:
    LOAD DATA
    CHARACTERSET WE8ISO8859P1
       APPEND INTO TABLE IMPORT_PRJ_TIMESHEETS
    -- Pour eliminer la ligne d'en-tete
    WHEN PROJET_CODE != 'ID projet'
       FIELDS TERMINATED BY '*-*' OPTIONALLY ENCLOSED BY '"'
    ( RESSOURCE_CODE       CONSTANT '!RESSOURCE_CODE!'
    , REFERENCE_DATE       CONSTANT '!REFERENCE_DATE!'
    , STATUS               CONSTANT '!STATUS!'
    , PROJET_CODE          CHAR
    , TACHE_ID             CHAR
    , TACHE_DESC           CHAR
    , RAF                  CHAR "TO_NUMBER( :RAF, '999G999D99')"
    , JOUR1                CHAR
    , JOUR2                CHAR
    , JOUR3                CHAR
    , JOUR4                CHAR
    , JOUR5                CHAR
    , JOUR6                CHAR
    , JOUR7                CHAR
    , IMPORT_DATE          SYSDATE
    )
    {code}
    
    
    3) the datafile :
    {code}
    ID projet*-*ID tâche*-*Tâche/Description*-*RàF*-*lun. 13/07*-*mar. 14/07*-*mer. 15/07*-*jeu. 16/07*-*ven. 17/07*-*sam. 18/07*-*dim. 19/07*-*
    FR-FR-NT2300135*-* *-*GAMMAWEB - Coordination*-*0,00*-* *-* *-* *-*8,00*-*8,00*-* *-* *-*
     *-* *-*Holiday*-* *-* *-*8,00*-* *-* *-* *-* *-* *-*
     *-* *-*Special leave*-* *-*8,00*-* *-* *-* *-* *-* *-* *-*
     *-* *-*Vacation*-* *-* *-* *-*8,00*-* *-* *-* *-* *-*
    
    {code}
    
    - As you can see, the datafile delimiter is "*-*" .... there's no pb about this.
    
    - Also, there are 5 lines in the datafile. Currently, the _*load status*_ is :
       - Line 1 is the header  >>> not loaded, and that's fine with me.
       - Line 2 is successfully loaded
       - Line 3 / Line 4 / Line 5 : are not loaded .. but I need these lines ...
    
    *What I'd like to get is to successfully load lines 3 to 5 with a default values for the first 3 columns (project/task ID/ task desc)*
    
    I hope it's clear enough and that you will be able to provide a good answer ..
    
    Thanks in advance,
      Olivier                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    In your example, the only ranked with value on all lines is TACHE_DESC.
    If this field is always filled, try this:
    WHEN TACHE_DESC! = "Task/Description".

    Concerning

  • Fill the InDesign document with external data?

    Hi all, I hope that I ask this question in the correct forum. I'm assuming that it is a problem of script, but if not, I apologize. Anyway - wonder if this is possible and, if so, if someone could point me in the general direction of more information:

    My company occasionally asked to produce directories of employee containing information (photos, contact information, education information, etc.) on different segments of the population closes - for example, a directory can include all women of color, we can include everyone in the Los Angeles Office, etc.. I would like to find a way to 'model' it in InDesign so that the relevant info can circulate in the external data source document - for example, database SQL of the HR or perhaps a spreadsheet generated from this database. I know that we are currently able to do something similar by using Word, but the final product looks like crap.

    I don't know what that would be even called in InDesign, so any information will be greatly appreciated. I use the CS5 version. Thank you!

    I could do this by using the data merge feature. It is similar to the functionality of fusion and mail merge in word. There is a great video of how it works here: http://www.theindesigner.com/blog/episode-43-data-merge-video

    There are more complex ways using XML or the third party plug-ins, but I would try this method first.

    Colly

  • The analysis of the external Web service XML data IS

    Hi all

    I'm looking to analyze the data returned by the Scopus API with Apex webservice.

    First of all, I tried parsing the JSON, however, it seems that the apex_json.parse function does not produce a result when the string contains a ':' character.  (It looks a lot like the webservice returns returns a JSON XML version below, namespace and all).

    I moved from the attempt to analyze the XML code that is less a model to:

    <?xml version="1.0" encoding="UTF-8"?>
    <search-results xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" 
    
    xmlns:prism="http://prismstandard.org/namespaces/basic/2.0/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://www.w3.org/2005/Atom">
      <opensearch:totalResults>2</opensearch:totalResults>
      <opensearch:startIndex>0</opensearch:startIndex>
      <opensearch:itemsPerPage>2</opensearch:itemsPerPage>
      <opensearch:Query role="request" startPage="0" searchTerms="authlast%28ryan%29+and+af-id%2860017837%29"/>
      <link type="application/xml" href="http://api.elsevier.com:80/content/search/author?start=0&count=25&query=authlast%28ryan%29+and+af-id
    
    %2860017837%29" ref="self"/>
      <link type="application/xml" href="http://api.elsevier.com:80/content/search/author?start=0&count=25&query=authlast%28ryan%29+and+af-id
    
    %2860017837%29" ref="first"/>
      <entry>
        <link href="http://api.elsevier.com/content/author/author_id/7402922277" ref="self"/>
        <link href="http://api.elsevier.com/content/search/author?query=au-id%287402922277%29" ref="search"/>
        <link href="http://www.sco pus.com/author/citedby.url?partnerID=HzOxMe3b&citedAuthorId=7402922277&origin=inward" ref="scopus-
    
    citedby"/>
        <link href="http://www.scopus.com/authid/detail.url?partnerID=HzOxMe3b&authorId=7402922277&origin=inward" ref="scopus-author"/>
        <prism:url>http://api.elsevier.com/content/author/author_id/7402922277</prism:url>
        <dc:identifier>AUTHOR_ID:7402922277</dc:identifier>
        <eid>9-s2.0-7402922277</eid>
        <preferred-name>
          <surname>Ryan</surname>
          <given-name>Philip J.</given-name>
          <initials>P.J.</initials>
        </preferred-name>
        <name-variant>
          <surname>Ryan</surname>
          <initials>P.J.</initials>
        </name-variant>
        <name-variant>
          <surname>Ryan</surname>
          <given-name>P. J.</given-name>
          <initials>P.</initials>
        </name-variant>
        <name-variant>
          <surname>Ryan</surname>
          <given-name>Phil</given-name>
          <initials>P.J.</initials>
        </name-variant>
        <document-count>28</document-count>
        <subject-area frequency="47" abbrev="AGRI">Agricultural and Biological Sciences (all)</subject-area>
        <subject-area frequency="24" abbrev="EART">Earth and Planetary Sciences (all)</subject-area>
        <subject-area frequency="15" abbrev="ENVI">Environmental Science (all)</subject-area>
        <affiliation-current>
          <affiliation-url>http://api.elsevier.com/content/affiliation/affiliation_id/60006905</affiliation-url>
          <affiliation-id>60006905</affiliation-id>
          <affiliation-name>CSIRO Forestry and Forest Products</affiliation-name>
          <affiliation-city>Kingston</affiliation-city>
          <affiliation-country>Australia</affiliation-country>
        </affiliation-current>
      </entry>
      <entry>
        <link href="http://api.elsevier.com/content/author/author_id/56970474800" ref="self"/>
        <link href="http://api.elsevier.com/content/search/author?query=au-id%2856970474800%29" ref="search"/>
        <link href="http://www.s copus.com/author/citedby.url?partnerID=HzOxMe3b&citedAuthorId=56970474800&origin=inward" ref="scopus-
    
    citedby"/>
        <link href="http://www.scopus.com/authid/detail.url?partnerID=HzOxMe3b&authorId=56970474800&origin=inward" ref="scopus-author"/>
        <prism:url>http://api.elsevier.com/content/author/author_id/56970474800</prism:url>
        <dc:identifier>AUTHOR_ID:56970474800</dc:identifier>
        <eid>9-s2.0-56970474800</eid>
        <preferred-name>
          <surname>Ryan</surname>
          <given-name>Peta</given-name>
          <initials>P.</initials>
        </preferred-name>
        <document-count>1</document-count>
        <subject-area frequency="2" abbrev="NURS">Nursing (all)</subject-area>
        <affiliation-current>
          <affiliation-url>http://api.elsevier.com/content/affiliation/affiliation_id/60017837</affiliation-url>
          <affiliation-id>60017837</affiliation-id>
          <affiliation-name>University of New England Australia</affiliation-name>
          <affiliation-city>Armidale</affiliation-city>
          <affiliation-country>Australia</affiliation-country>
        </affiliation-current>
      </entry>
    </search-results>
    

    So far, the best I could do is to extract the total results by XMLTable:

    SELECT results.totalResults INTO numResults FROM
        XMLTable(
            XMLNamespaces(
                default 'http://www.w3.org/2005/Atom',
                'http://prismstandard.org/namespaces/basic/2.0/' as "prism",
                'http://a9.com/-/spec/opensearch/1.1/' as "opensearch",
                'http://purl.org/dc/elements/1.1/' as "dc"),
            '/search-results' PASSING xmlResult
             COLUMNS
             totalResults NUMBER PATH '//opensearch:totalResults') results;
    

    I'm not convinced that using XMLTable is the best solution, but that's what I've learned to work.  Take it further proves to be more problematic.

    Ideally, what I want to do is get the Subproperty, favorite-name/given-name, favorite-name/initials, favorite-name and affiliation-affiliation/current-name in a collection, as well as the entrance of <>... < / input >.  The user can then select the correct author, and we can use the full set of data to process.

    I'm sure that my problem comes down to manage multiple with XPath, although namespaces that putting my XPath through Validator online gives the desired result, it does not work for me in my PL/SQL.

    If someone could provide some tips and suggestions, I would be very grateful.


    Thank you very much


    Andrew Rochdale-Meares

    Andrew Rochdale-Meares wrote:

    I'm looking to analyze the data returned by the Scopus API with Apex webservice.

    I moved from the attempt to analyze the XML code that is less a model to:

    So far, the best I could do is to extract the total results by XMLTable:

    1. SELECT results.totalResults INTO numResults OF
    2. XMLTable)
    3. XMLNamespaces)
    4. default "http://www.w3.org/2005/Atom",.
    5. "http://prismstandard.org/namespaces/basic/2.0/" as "Prism,"
    6. "http://a9.com/-/spec/opensearch/1.1/" as "opensearch".
    7. ("http://purl.org/dc/elements/1.1/" as "dc").
    8. ' / search result PASSING xmlResult
    9. COLUMNS
    10. totalResults NUMBER PATH ' / / ' opensearch:totalResults) results;

    I'm not convinced that using XMLTable is the best solution, but that's what I've learned to work.  Take it further proves to be more problematic.

    Ideally, what I want to do is to get the Subproperty, favorite-name/given-name, favorite-name/initials, favorite-name and affiliation-current/affiliation-name in a collection, as well as of the ..  The user can then select the correct author, and we can use the full set of data to process.

    The results using XMLTable of shredding is the best way to get results in a collection.

    I'm sure that my problem comes down to manage multiple with XPath, although namespaces that putting my XPath through Validator online gives the desired result, it does not work for me in my PL/SQL.

    It is not clear where you encountered problems because no details of the attempts to obtain the required information has been provided. Is not clear from the description exactly what "...". along with the ..." means, so I assumed that you want to store this item as an XML fragment in the collection. It is therefore necessary to use a loop with apex_collection.add_member as the most effective create_collection_from_queryb2 method doesn't have support to complete the collection XML column:

    ...
    
      /* Assuming the xmlResult variable is set somewhere previously... */
    
      apex_collection.create_or_truncate_collection('SCOPUS_RESULTS');
    
      for scopus_entry in (
        select
            se.*
        from
            xmltable(
                xmlnamespaces(
                    default 'http://www.w3.org/2005/Atom'
                  , 'http://prismstandard.org/namespaces/basic/2.0/' as "prism"
                  , 'http://a9.com/-/spec/opensearch/1.1/' as "opensearch"
                  , 'http://purl.org/dc/elements/1.1/' as "dc")
              , '/search-results/entry'
                passing xmlResult
                columns
                    dc_identifier    varchar2(64 char)  path 'dc:identifier'
                  , given_name       varchar2(64 char)  path 'preferred-name/given-name'
                  , initials         varchar2(64 char)  path 'preferred-name/initials'
                  , surname          varchar2(64 char)  path 'preferred-name/surname'
                  , affiliation_name varchar2(256 char) path 'affiliation-current/affiliation-name'
                  , entry_xml        xmltype            path '.') se)
      loop
        apex_collection.add_member(
            p_collection_name => 'SCOPUS_RESULTS'
          , p_c001 => scopus_entry.dc_identifier
          , p_c002 => scopus_entry.given_name
          , p_c003 => scopus_entry.initials
          , p_c004 => scopus_entry.surname
          , p_c005 => scopus_entry.affiliation_name
          , p_xmltype001 => scopus_entry.entry_xml);
      end loop;
    
    ...
    
  • Insert XML data from the Table-&gt; back to null

    Dear Experts,

    -I have table xml as below:

    Example of CREATE TABLE (XML_spec XMLTYPE);

    Insert in the example
    Select ' < name of Message = "dataStaticInvestor" type = "IncomingMessage" >
    < name of field = "batchReference" > OPENINGBATCH000000 < / field > < List name = "data" >
    < = record name "data" >
    < name of field = "externalReference" > 01234567890aaaaaaa < / field >
    < name of field = "participantID" > OD001 < / field >
    < name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
    < / recording >
    < = record name "data" >
    < name of field = "externalReference" > 01234567890aaaaaaa < / field >
    < name of field = "participantID" > OD001 < / field >
    < name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
    < / recording >
    < = record name "data" >
    < name of field = "externalReference" > 01234567890aaaaaaa < / field >
    < name of field = "participantID" > OD001 < / field >
    < name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
    < / recording >
    < / list >
    < / message > ' double.

    Select * example;

    create table hasil1 (c1 varchar2 (500), c2 varchar2 (500), c3 varchar2 (500));

    -This step I create the procedure to insert xml data into the table as the batch.

    DECLARE
    x XmlType;
    BEGIN
    Select XML_SPEC in x for example;

    insert into hasil1
    SELECT
    p.Extract('/Record/Field/@externalReference').getstringval (C1),
    p.Extract('/Record/Field/@participantID').getstringval (C2),
    p.Extract('/Record/Field/@participantName').getstringval () as c3
    TABLE (XMLSequence (Extract(x,'Message/List/Record'))) p;
    commit;
    END;
    /

    -when the result of select hasil1, the output is back 3 rows and 3 columns, but all data is a null *.

    Best regards
    Sigcle

    You don't explain what output you need, but I guess something like this:

    SQL> insert into hasil1 (c1, c2, c3)
      2  select x.c1, x.c2, x.c3
      3  from example t
      4     , xmltable(
      5         'Message/List/Record'
      6         passing t.xml_spec
      7         columns c1 varchar2(500) path 'Field[@name="externalReference"]'
      8               , c2 varchar2(500) path 'Field[@name="participantID"]'
      9               , c3 varchar2(500) path 'Field[@name="participantName"]'
     10       ) x
     11  ;
    
    3 rows inserted
    
    SQL> select * from hasil1;
    
    C1                     C2        C3
    ---------------------- --------- --------------------------------
    01234567890aaaaaaa     OD001     EQUITY SECURITIES INDONESIA,PT
    01234567890aaaaaaa     OD001     EQUITY SECURITIES INDONESIA,PT
    01234567890aaaaaaa     OD001     EQUITY SECURITIES INDONESIA,PT
     
    

Maybe you are looking for