Datagrid-Multiple child nodes of xml provide as dataprovider

<QueueIndex>
<id>
<qixQltId>104</qixQltId>
<qixIndexname>Branch</qixIndexname>
<dixId>104</dixId>
<qixSeq>1</qixSeq>
</id>
<qixIndexvalue>WFI_S_Branch</qixIndexvalue>
<qixLength>255</qixLength>
<qixType>S</qixType>
<qixList>Y</qixList>
</QueueIndex>
i have the above xml which im providing to datagrid.<mx:DataGrid
id="myDataGrid" dataProvider="{xmlObjectQFields.QueueIndex}">
<mx:columns>
<mx:DataGridColumn dataField="id.qixQltId" headerText="ID"/>
<mx:DataGridColumn dataField="qixMand" headerText="Name"/>
<mx:DataGridColumn dataField="qixReadonly" headerText="Desc"/>
<mx:DataGridColumn dataField="qixLength" headerText="Map Value"/>
<mx:DataGridColumn dataField="qixType" headerText="Region"/>
<mx:DataGridColumn dataField="qixList" headerText="Sequence"/>
</mx:columns>
</mx:DataGrid>
i get the first column as null.  but when i give dataField as "id" only  i get to see <id>contents in this tag/<id>i want to print "104"

<QueueIndex>
<id>
<qixQltId>104</qixQltId>
<qixIndexname>Branch</qixIndexname>
<dixId>104</dixId>
<qixSeq>1</qixSeq>
</id>
<qixIndexvalue>WFI_S_Branch</qixIndexvalue>
<qixLength>255</qixLength>
<qixType>S</qixType>
<qixList>Y</qixList>
</QueueIndex>
i have the above xml which im providing to datagrid.<mx:DataGrid
id="myDataGrid" dataProvider="{xmlObjectQFields.QueueIndex}">
<mx:columns>
<mx:DataGridColumn dataField="id.qixQltId" headerText="ID"/>
<mx:DataGridColumn dataField="qixMand" headerText="Name"/>
<mx:DataGridColumn dataField="qixReadonly" headerText="Desc"/>
<mx:DataGridColumn dataField="qixLength" headerText="Map Value"/>
<mx:DataGridColumn dataField="qixType" headerText="Region"/>
<mx:DataGridColumn dataField="qixList" headerText="Sequence"/>
</mx:columns>
</mx:DataGrid>
i get the first column as null.  but when i give dataField as "id" only  i get to see <id>contents in this tag/<id>i want to print "104"

Similar Messages

  • How to store multiple child nodes using dbms_xmlstore

    Hi,
    I'm using oracle 10g environment. In DBMS_XMLSTORE package I cannot able to insert the multiple child node value into db table.
    Here I have given the xml value
    <DATAPACKET REQUEST-ID="10001094">
      <HEADER>
        <SEARCH-RESULT-LIST>
          <SEARCH-RESULT-ITEM NAME="Ra-Al-Gul" CONFIDENCE-SCORE="750" BUREAU-ID="893991307899440">
            <IDENTIFIERS>
              <IDENTIFIER IDSOURCE="0001" MATCHED="TRUE"/>
            </IDENTIFIERS>
            <SURROGATES>
              <SURROGATE ID="CH0001" MATCHED="TRUE"/>
              <SURROGATE ID="CH0002" MATCHED="TRUE"/>
              <SURROGATE ID="CH0003" MATCHED="TRUE"/>
            </SURROGATES>
          </SEARCH-RESULT-ITEM>
        </SEARCH-RESULT-LIST>
      </HEADER>
    </DATAPACKET>for this xml data I have created the below table structure
    -- Table create script
    CREATE TABLE xml_insert (datapacket t_response );
    /* Type creation  code  */
    CREATE OR REPLACE TYPE t_response AS OBJECT
      "@REQUEST-ID" VARCHAR2(100),
      header        t_resp_header
    CREATE OR REPLACE TYPE t_resp_header AS OBJECT
      "SEARCH-RESULT-LIST"    t_search_item
    CREATE OR REPLACE TYPE t_search_item AS OBJECT
    ("SEARCH-RESULT-ITEM"      t_search_list);
    CREATE OR REPLACE TYPE t_search_list AS OBJECT
    ("@NAME"           VARCHAR2(300),
    "@CONFIDENCE-SCORE"      VARCHAR2(300),
    "@BUREAU-ID"           VARCHAR2(300),
    IDENTIFIERS           t_search_identifiers,
    SURROGATES           t_search_surrogates
    CREATE OR REPLACE TYPE t_search_identifiers AS OBJECT
    (IDENTIFIER           t_search_IDENTIFIER);
    CREATE OR REPLACE TYPE t_search_identifier AS OBJECT
      "@IDSOURCE"           VARCHAR2(20),
      "@MATCHED"           VARCHAR2(20)
    CREATE OR REPLACE TYPE t_search_surrogates AS OBJECT
    (SURROGATE           t_search_SURROGATE);
    CREATE OR REPLACE TYPE t_search_surrogate AS OBJECT
    "@ID"                VARCHAR2(20),
    "@MATCHED"           VARCHAR2(20)
    CREATE OR REPLACE TYPE tb_search_surrogate AS TABLE of t_search_SURROGATE;
    /and run this block
      DECLARE
      insCtx DBMS_XMLStore.ctxType;
      rows NUMBER;
      xmldoc CLOB :=
    <ROWSET>
    <ROW>
    <DATAPACKET REQUEST-ID="Q10001094">
      <HEADER>
        <SEARCH-RESULT-LIST>
          <SEARCH-RESULT-ITEM NAME="Anis kulam" CONFIDENCE-SCORE="750" BUREAU-ID="893991307899440">
            <IDENTIFIERS>
              <IDENTIFIER IDSOURCE="0001" MATCHED="TRUE"/>
            </IDENTIFIERS>
            <SURROGATES>
              <SURROGATE ID="CH0001" MATCHED="TRUE"/>
              <SURROGATE ID="CH0002" MATCHED="TRUE"/>
              <SURROGATE ID="CH0003" MATCHED="TRUE"/>
            </SURROGATES>
          </SEARCH-RESULT-ITEM>
        </SEARCH-RESULT-LIST>
      </HEADER>
    </DATAPACKET>
    </ROW>
    </ROWSET>';
    BEGIN
      insCtx := DBMS_XMLStore.newContext('xml_check');
      rows := DBMS_XMLStore.insertXML(insCtx, xmlDoc);
      DBMS_XMLStore.closeContext(insCtx);
    END;I got the following error
    Error Messgae :
    ORA-19031: XML element or attribute SURROGATE does not match any in type DOHADEV.T_CRB_SEARCH_SURROGATES
    ORA-06512: at "SYS.DBMS_XMLSTORE", line 78
    ORA-06512: at line 28

    Hi,
    A couple of comments to begin with :
    - Your setup script, test case and error message are not consistent with each other.
    - You've not chosen the easiest road with DBMS_XMLSTORE and nested objects. As pointed out in a previous thread of yours, the whole thing would be far more simple with XMLTable.
    Do you really need to store the data in an object-relational structure at the end, or do you intend to further break it down into relational rows and columns?
    Do you have an XML schema?

  • EXTRACTVALUE + MULTIPLE CHILD NODES

    Hi,
    I have a XML Doc where I have multiple nodes in a tag and I need to extract the data using extractvalue funtion.
    My XMLtype doc stores a xml doc in this form:
    <CYKDoc xmlns="CYKdocument.bankxyz.com">
    <CYK>
    <gci>12345678</gci>
    <system>LION</system>
    <recordType>1</recordType>
    <CYKId>987654</CYKId>
    <policyVersion>DDL 1.0</policyVersion>
    </CYK>
    <CYKResponse>
         <id>q_grid</id>
         <grid>
         <data>
         <dataRow>
         <dataColumn>
         <id>q_grid_id</id>
         <name>q_grid_id</name>
         <codes>
         <code>704</code>
         </codes>
         </dataColumn>
         <dataColumn>
         <id>q_owner_type</id>
         <name>q_owner_type</name>
         <codes>
         **<code>IN</code>**
    **     <code>OUT</code>**
    **     <code>BETWEEN</code>**
         </codes>
         <catName>ben_owner_type</catName>
         </dataColumn>
         </dataRow>
         </data>
         </grid>
         </CYKResponse>
         </CYKResponses>
    </CYKDoc>
    In the above XML, I have a tag of name "q_owner_type" which has multiple child nodes..but I am not able to fetch the codes of any tag at all..
    My Query is :
    SELECT CYK_id,q_id,code,catname
         FROM ((SELECT p.CYK_id CYK_id,
         EXTRACTVALUE (VALUE (tab1), 'dataColumn/id') q_id,
         EXTRACTVALUE(VALUE(tab2), '/code') AS code,
         EXTRACTVALUE (VALUE (tab1),
         'dataColumn/catName'
         ) catname
         FROM CYK.CYK_doc p,
         TABLE
         (XMLSEQUENCE
         (EXTRACT
         (p.CYK_doc, '/CYKDoc/CYKResponses/CYKResponse[id="q_grid"]/grid/data/dataRow[1]/dataColumn'))) tab1,
         TABLE (XMLSEQUENCE (EXTRACT (VALUE (tab1), 'dataColumn/codes/code'))) tab2
         )) a
    WHERE a.CYK_id = 227209;
    I get 4 rows having one question as q_grid_id and 3 questions as q_owner_type but the extractvalue( tab2) doesnt fetch the values of codes....
    I am assuming that its an issue with XPATH I mentioned in alias tab2 but How else to handle it, is an issue here...
    If In TABLE (XMLSEQUENCE (EXTRACT (VALUE (tab1), 'dataColumn/codes/code'))) tab2 I refer the path only till codes, it errors out with saying that "single row fetches multiple records" because there are multiple child records..
    How to handle this??
    Please HELP
    Thanks
    Mahesh

    Hi,
    Is there no way to handle this?
    I am sort of running out of time, but not able to think of any solution for this.. There must be a way to do so..
    I found the below link while surfing :
    http://www.componentworkshop.com/blog/2009/07/21/advanced-oracle-parsing-xml-fragments-in-oracle-functions-and-procedures
    I think this link has some answer to my solution in terms of joins but I managed to find no solution to it.
    <EmailAddresses>
    <EmailAddress>[email protected]</EmailAddress>
    <EmailAddress>[email protected]</EmailAddress>
    <EmailAddress>[email protected]</EmailAddress>
    </EmailAddresses>
    How do i extract the EmailAddress from the parent tag ?? while using the XPath to extract the values..??
    Please let me know.
    Thanks in advance

  • Need to chart attribute value of just one child node of XML document

    I have a XML document with (for example) 7 parent nodes, each
    parent node has 5 child nodes. The parent nodes have an attribute
    @EarlierDTS (DateTime type) that is the x-axis category of a chart.
    Each child node has an attribute @eventid which specifies the id of
    the event, and another atttribute @NumOccurs which specifies how
    many times that event occured in that period.
    How do I tell Flex I want a simple line chart of the eventID
    = 215? What if I want two lines, for both eventID=215 and
    eventid=307?
    I have studied the posts and blogs for over a week now, and
    have seen this question or similar come up quite a few places, with
    no answer.
    1) Should I focus on learning how to create a filterfunction
    for the XMLList that underlies my XMLListCollection so that the
    filtered data view is just one child node per parent node ( or two
    child nodes for the second case)? And set the filtered data view as
    the dataprovider of my chart's vertical series?
    2) Should I focus on learning how to create a XML Filter
    query that selects just one or two child nodes for each parent
    node, and set the charts' series' dataprovider to this filter
    expression? (I don't think this is allowed - but I'm checking with
    the forum members...)
    3) Should I focus on learning how to convert the
    XMLListCollection into a HierarchicalData object, and then learning
    how to filter this object so there is only one (or two) childs per
    parent? This seems like a lot of coding - I almost have to create a
    pair of classes - one for the parent and one for the child - so I
    can create nested ArrayObjects.
    4) Should I create a brand new XMLList by walking the
    original XML list, and inserting Parent nodes and just the child
    nodes that match the eventID(s) I want to chart, into the new
    XMLList?
    I believe that the easiest way would be to create a
    Filterfunction for the XMLList, and bind the chart series to the
    (filtered) XML List. But the problem with this approach is that I
    have seen more than 2 posts asking how to accomplish filtering that
    removes specific children from the view, with no solutions posted.
    Help! What is the best way to get just one child for each
    parent, from an XMLList?

    "whertzing" <[email protected]> wrote in
    message
    news:[email protected]...
    >I have a XML document with (for example) 7 parent nodes,
    each parent node
    >has 5
    > child nodes. The parent nodes have an attribute
    @EarlierDTS (DateTime
    > type)
    > that is the x-axis category of a chart. Each child node
    has an attribute
    > @eventid which specifies the id of the event, and
    another atttribute
    > @NumOccurs
    > which specifies how many times that event occured in
    that period.
    >
    > How do I tell Flex I want a simple line chart of the
    eventID = 215? What
    > if I
    > want two lines, for both eventID=215 and eventid=307?
    >
    > I have studied the posts and blogs for over a week now,
    and have seen this
    > question or similar come up quite a few places, with no
    answer.
    >
    > 1) Should I focus on learning how to create a
    filterfunction for the
    > XMLList
    > that underlies my XMLListCollection so that the filtered
    data view is just
    > one
    > child node per parent node ( or two child nodes for the
    second case)? And
    > set
    > the filtered data view as the dataprovider of my chart's
    vertical series?
    >
    > 2) Should I focus on learning how to create a XML Filter
    query that
    > selects
    > just one or two child nodes for each parent node, and
    set the charts'
    > series'
    > dataprovider to this filter expression? (I don't think
    this is allowed -
    > but
    > I'm checking with the forum members...)
    >
    > 3) Should I focus on learning how to convert the
    XMLListCollection into a
    > HierarchicalData object, and then learning how to filter
    this object so
    > there
    > is only one (or two) childs per parent? This seems like
    a lot of coding -
    > I
    > almost have to create a pair of classes - one for the
    parent and one for
    > the
    > child - so I can create nested ArrayObjects.
    >
    > 4) Should I create a brand new XMLList by walking the
    original XML list,
    > and
    > inserting Parent nodes and just the child nodes that
    match the eventID(s)
    > I
    > want to chart, into the new XMLList?
    >
    > I believe that the easiest way would be to create a
    Filterfunction for the
    > XMLList, and bind the chart series to the (filtered) XML
    List. But the
    > problem
    > with this approach is that I have seen more than 2 posts
    asking how to
    > accomplish filtering that removes specific children from
    the view, with no
    > solutions posted.
    >
    > Help! What is the best way to get just one child for
    each parent, from an
    > XMLList?
    I'd just look at a dataFunction. There's an example here that
    may point you
    in the right direction:
    http://flexdiary.blogspot.com/2008/08/charting-example.html
    HTH;
    Amy

  • How create Nested Child Nodes in XML Forms

    Hello All:
                        I am very new to XML Forms/KM. I am trying to figure out a way to create Nested Child Nodes schema in XML Forms. Is there a way we can do it?
    Thanks and Regards,
    Vasu.

    Document document;
    NodeList[] dataNodeList=new NodeList[2];
    NodeList nodeList=document.getElementsByTagName("MyData");
    for(int i=0; i<nodeList.getLength(); i++)
    dataNodeList=nodeList.getChildNodes();

  • Read Xml Child node from XML Blob

    Hi Gurus,
    Greetings
    I am working in oracle 10g /Solaris platform.
    I have table with columns namely id varcha2,pmt blob.
    PMT stores xml file.
    <Products xmlns:source="http://apache.org/cocoon/source/1.0" DocStatus="approved" DocTimeStamp="2013-04-18T06:52:14" DocType="PMT" DocVersion="xUCDM_product_external_1_3.xsd">
    <Product Country="DE" IsAccessory="false" IsLocalized="true" IsMaster="false" Locale="de_DE" lastModified="2013-04-18T00:08:11" masterLastModified="2013-02-25T14:46:40">
    <Assets>
      <Asset code="46PFL8008S_12" description="User manual" extension="pdf" extent="3359201" lastModified="2013-04-18" locale="de_DE" number="001" type="DFU">http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_dfu_deu.pdf</Asset>
      <Asset code="46PFL8008S_12" description="Leaflet" extension="pdf" extent="970750" lastModified="2013-04-18" locale="de_DE" number="001" type="PSS">http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_pss_deu.pdf</Asset>
      <Asset code="46PFL8008S_12" description="Quick start guide" extension="pdf" extent="911832" lastModified="2013-04-18" locale="de_DE" number="001" type="QSG">http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_qsg_deu.zip</Asset>
      <Asset code="46PFL8008S_12" description="Front product photograph - highres 2196x1795" extension="jpg" extent="1989253" lastModified="2013-04-18" locale="global" number="001" type="_FP">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-_FP-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 1 - highres 2196x1795" extension="jpg" extent="603474" lastModified="2013-04-18" locale="global" number="001" type="A1P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A1P-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 2 - highres 2196x1795" extension="jpg" extent="407701" lastModified="2013-04-18" locale="global" number="001" type="A2P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A2P-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 3 - highres 2196x1795" extension="jpg" extent="174261" lastModified="2013-04-18" locale="global" number="001" type="A3P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A3P-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 4 - highres 2196x1795" extension="jpg" extent="109712" lastModified="2013-04-18" locale="global" number="001" type="A4P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A4P-global-001</Asset>
       </Assets>
    </Product>
      </Products>');
      I want the extract the ids from the table where pmt contains the child node (asset) contains .zip
    for example http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_qsg_deu.zip
    Then, I tried like this...
      select r.* from
       (SELECT xmltype(pmt) object_value
                     FROM PRODUCT_TR_PMT
                     XMLTABLE
                                     'for $Product  in $TEST/Products/Product/Assets/Asset
                                         return <RESULT>
                                                   $Product                     
                                                </RESULT>'
                                     passing OBJECT_VALUE as "TEST"   
                                     columns Asset path 'Asset' 
                                 ) r;
    ORA-02263: need to specify the datatype for this column
      Could you kindly help.
    Thanks
    Raj

    Blob storage we (db folks) dont have any control its from application standard design.
    If necessary, i can create function blob to clob.
    Kindly help me in extracting child node which contains zip.
       select r.* from
       (SELECT xmltype(pmt) object_value
                     FROM PRODUCT_TR_PMT
                     XMLTABLE
                                     'for $Product  in $TEST/Products/Product/Assets/Asset
                                         return <RESULT>
                                                   $Product                     
                                                </RESULT>'
                                     passing OBJECT_VALUE as "TEST"   
                                     columns Asset varchar2(255) path 'Asset' 
                                 ) r;
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'XMLTYPE'Thanks
    Raj

  • Using assign-activity:Append to append child nodes in XML-tree within loop

    I would like to produce an XML looking something like this (just an example):
    &lt;Customer&gt;
    &lt;Name&gt;Tom&lt;/Name&gt;
    &lt;Invoices&gt;
    &lt;Invoice&gt;
    &lt;InvoiceData&gt;.....&lt;/InvoiceData&gt;
    &lt;/Invoice&gt;
    &lt;Invoice&gt;
    &lt;InvoiceData&gt;.....&lt;/InvoiceData&gt;
    &lt;/Invoice&gt;
    &lt;/Invoices&gt;
    &lt;/Customer&gt;
    For different reasons (composite PK's in DB etc) I have to first get the Customer-data, and then get each Invoice for that customer.
    Then I have to loop the Invoices and append each Invoice-node to the XML, ending up with the whole thing when the loop is finished.
    This should be pretty simple (I guess), and I have tried different variations of the Append (assign activity), but everytime I end up with only the last Invoice-node.
    I can see in the Flow-window of the BPEL Console that it is not the same Invoice-node I'm appending within the loop-iterations, so that can not be the case in any way.
    In other words it seems to copy instead of appending.
    What is wrong ?
    Is this a bug in the Append function ?
    Any suggestions to other approaches that might work ? (I have to use the loop to get 1 and 1 Invoice-node though, and in that way put the whole XML together in some way)
    Edited by: user1694182 on 09.okt.2008 05:08

    Thank you for your answer.
    After taking your "debugging"-suggestions at hand and running some tests, I can now see that it gets appended in some way, but not correctly.
    1st LOOP ROUND:
    <installation>
    <measurePoints>
    <measurePoint><measurePointId>308</measurePointId>...</measurePoint>
    </mesurePoints>
    </installation>
    Correct so far.
    2nd LOOP ROUND:
    <installation>
    <measurePoints>
    <measurePoint><measurePointId>322</measurePointId>...</measurePoint>
    <measurePoint><measurePointId>322</measurePointId>...</measurePoint>
    </mesurePoints>
    </installation>
    So now it appends the new measurepoint, but overwrites the 1st as well... Strange..
    3rd LOOP ROUND (last round):
    <installation>
    <measurePoints>
    <measurePoint><measurePointId>382</measurePointId>...</measurePoint>
    <measurePoint><measurePointId>382</measurePointId>...</measurePoint>
    </mesurePoints>
    </installation>
    So suddenly the same Append doesn't append, but overwrites the 2 I had with the new measurepoint...Strange...
    WHAT I DO IN MORE DETAIL:
    1: Assign(copy) the whole XML in the 1st loop round. (Copy - FROM: submitInstallation_InputVariable - TO: Powel_InstallationServiceInput)
    2: Within each loop round I collect the whole XML with just 1 measurePoint (TransformActivity - FROM: DBAdapter-output - TO: submitInstallation_InputVariable).
    3: Within each loop round I then append the new measurePoint (collected in step 2) to the measurePoints-node. (Append - FROM: submitInstallation_InputVariable - TO: Powel_InstallationServiceInput)
    PS! I can see in the BPEL Console that it is a new measurePoint that gets collected in step 2, and just 1 node.
    Help/tips on this is very appreciated ! :-)
    Edited by: user1694182 on 14.okt.2008 00:57

  • How to select data with multiple child nodes

    We have the following data:
    me table ei table
    m1 e1
    m1 e2
    m1 e3
    m1 e4
    m2 e5
    m2 e6
    m3 e7
    m3 e8
    I would like to display them as:
    m1 e1
    e2
    e3
    e4
    m2 e5
    e6
    m3 e7
    e8
    How to best do this with sql?
    I would like to produce this list with sql and then transform it to xml.
    Thanks.

    Since you did not use tags it is not clear what results should be:
    SQL> WITH TBL AS (
      2  SELECT 'm1' me, 'e1' ei FROM DUAL UNION ALL
      3  SELECT 'm1' me, 'e2' ei FROM DUAL UNION ALL
      4  SELECT 'm1' me, 'e3' ei FROM DUAL UNION ALL
      5  SELECT 'm1' me, 'e4' ei FROM DUAL UNION ALL
      6  SELECT 'm2' me, 'e5' ei FROM DUAL UNION ALL
      7  SELECT 'm2' me, 'e6' ei FROM DUAL UNION ALL
      8  SELECT 'm3' me, 'e7' ei FROM DUAL UNION ALL
      9  SELECT 'm3' me, 'e8' ei FROM DUAL
    10  )
    11  SELECT  CASE ROW_NUMBER() OVER(PARTITION BY ME ORDER BY EI) WHEN 1 THEN ME ELSE NULL END ME,
    12          EI
    13    FROM  TBL
    14    ORDER BY TBL.ME,
    15             TBL.EI
    16  /
    ME EI
    m1 e1
       e2
       e3
       e4
    m2 e5
       e6
    m3 e7
       e8
    8 rows selected.or
    SQL> WITH TBL AS (
    2 SELECT 'm1' me, 'e1' ei FROM DUAL UNION ALL
    3 SELECT 'm1' me, 'e2' ei FROM DUAL UNION ALL
    4 SELECT 'm1' me, 'e3' ei FROM DUAL UNION ALL
    5 SELECT 'm1' me, 'e4' ei FROM DUAL UNION ALL
    6 SELECT 'm2' me, 'e5' ei FROM DUAL UNION ALL
    7 SELECT 'm2' me, 'e6' ei FROM DUAL UNION ALL
    8 SELECT 'm3' me, 'e7' ei FROM DUAL UNION ALL
    9 SELECT 'm3' me, 'e8' ei FROM DUAL
    10 )
    11 SELECT CASE ROW_NUMBER() OVER(PARTITION BY ME ORDER BY EI) WHEN 1 THEN ME ELSE EI END ME,
    12 CASE ROW_NUMBER() OVER(PARTITION BY ME ORDER BY EI) WHEN 1 THEN EI ELSE NULL END EI
    13 FROM TBL
    14 ORDER BY TBL.ME,
    15 TBL.EI
    16 /
    ME EI
    m1 e1
    e2
    e3
    e4
    m2 e5
    e6
    m3 e7
    e8
    8 rows selected.
    SQL>
    SY.

  • Help with xsl for multiple child node

    We have the following data.
    row          meID EI
    1          a a1
              a2
              a3
              a4
    2          b b1
              b2
    3          c c1
              c2
    I would like to use XSL to display the data in the fashion:
    <row=1>
    <meID>a</meID>
    <EI>a1</EI>
    <EI>a2</EI>
    <EI>a3</EI>
    <EI>a4</EI>
    </row>
    <row=2>
    <meID>b</meID>
    <EI>b1</EI>
    <EI>b2</EI>
    </row>
    <row=3>
    <meID>c</meID>
    <EI>c1</EI>
    <EI>c2</EI>
    </row>
    Currently, I am only able to get the XSL to lump all the EIs together:
    <row=1>
    <meID>a</meID>
    <EI>a1a2a3a4</EI>
    </row>
    What do I need to change in the XSL to make it display 4 rows of EI?
    Thanks.

    The data should look like:
    1_________a_________a1
    ____________________a2
    ____________________a3
    ____________________a4
    2_________b_________b1
    ____________________b2
    3_________c_________c1
    ____________________c2

  • How can provide parent-child nodes relation ships?

    how can provide parent-child nodes relation ships?

    I was under the impression that scenegraph is like a JTree. But in JavaFX only leaf node rendering in scenegraph. This situation was confusing my mind. In JavaFX CustomNode must be extending and return a group for custom leaf. If we want to a create parent-child node hierarchy we are create CustomNode that return a group and this group contain an another group,etc. So there is maybe only a way. If you learning to JavaFX first time.This way don't look familiar.

  • How to append an xml string as a child node to a dom document

    Hi
    I have an xml represented as a String. Now I want to add this xml string as a child node to another DOM Document.
    Do I have to first parse the xml String into a xml Document and then add the nodes to the existing Document. Is there a simpler way to do this. Any input is appreciated.
    Many thanks in advance.

    radsat wrote:
    Hi
    I have an xml represented as a String. Now I want to add this xml string as a child node to another DOM Document.
    Do I have to first parse the xml String into a xml Document and then add the nodes to the existing Document. yes, this is what you need to do.
    Is there a simpler way to do this. Any input is appreciated.no, there really isn't, sorry.

  • Two Datagrids, Multiple Provider Issue

    What Im trying to do is when when DataGrid1 has an item
    selected it fills out a series of text boxes and another DataGrid.
    All the data is in XML, so when I click on one element, to access
    the proper element i go data_grid1.selectedItem.state
    But for the second DataGrid the data that goes into there is:
    <people>
    <person email=...>
    </people>
    and the dataPovider i use is data_grid1.selectedItem.people,
    I get
    Multiple initializers for property 'dataProvider'. (note:
    'dataProvider' is the default property of
    'mx.controls.DataGrid')
    In
    this
    example I tried doing what he did and his examples compile with
    no problems but I dont know how to do that for myself, what am I
    doing wrong?
    <?xml version="1.0" encoding="UTF-8"?>
    <mx:Application xmlns:flexlib="
    http://code.google.com/p/flexlib/"
    xmlns="*" xmlns:mx="
    http://www.adobe.com/2006/mxml"
    height="100%" width="100%" applicationComplete="getXML()">
    <mx:Script>
    <![CDATA[
    import mx.rpc.http.HTTPService;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.controls.Alert;
    public function getXML():void
    var serv:HTTPService = new HTTPService();
    serv.contentType="application/xml";
    serv.url="contacts.xml";
    //serv.useProxy=false;
    serv.resultFormat="xml";
    serv.addEventListener("result",gotResult);
    serv.addEventListener("fault",gotFault);
    serv.send();
    private function gotFault(event:FaultEvent):void
    Alert.show(event.fault.message);
    [Bindable]
    var myXML:XML;
    private function gotResult(event:ResultEvent):void
    myXML = new XML(event.result);
    //avListing.dataProvider = myXML.contact;
    public function searchAndReplace(holder:String):String
    var searchfor:String="\t";
    var replacement:String="";
    var temparray:Array= holder.split(searchfor);
    var holder:String = temparray.join(replacement);
    searchfor="\r";
    temparray= holder.split(searchfor);
    holder = temparray.join(replacement);
    return (holder);
    ]]>
    </mx:Script>
    <mx:Binding source="myXML.contact" destination
    ="avListing.dataProvider"/>
    <mx:Binding source="avListing.selectedItem.people as XML"
    destination="grid_contacts.dataProvider"/>
    <mx:HBox width="100%" height="100%">
    <mx:DataGrid id="avListing" width="25%" height="100%">
    <mx:columns>
    <mx:DataGridColumn dataField="state"
    headerText="State"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:TextArea id="box_State"
    text="{avListing.selectedItem.state}" width="100" height="20"/>
    <mx:TextArea id="box_Address"
    text="{searchAndReplace(avListing.selectedItem.address)}"
    width="250" height="100"/>
    <mx:DataGrid id="grid_contacts" width="300"
    height="100">
    <mx:DataGridColumn dataField="person"
    headerText="Person"/>
    </mx:DataGrid>
    </mx:HBox>
    </mx:Application>

    I had done that before, even though the ids are different I
    get that error. The reason I was using the Binding was that I was
    following this example:
    http://blog.paranoidferret.com/index.php/2007/07/27/flex-friday-feature-datagrid-component /
    They have two datagrids in there yet it works. Now is this
    happening just because I am using Flex 2.01 SDK instead of using
    the builder? I've noticed that there is a difference between the
    two when it comes to getting things to work.

  • Update xml column by inserting any missing child nodes from a M_V

    Hello all,
    I am trying to update a xml column(col1) of a table (abc) by looping through, by selecting from a materialized view and find any missing (child) nodes in the existing table (abc) of a xml column (col1) on each rows, and then do update the xml column (col1) of table (abc). How to do this in Oracle pl/sql?.
    Thanks & Regards,
    Josh

    You do not need stored procedure for that. Use something like APPENDCHILDXML, INSERTCHILDXML or INSERTXMLBEFORE. For example, to insert a node into XML document:
    SELECT  APPENDCHILDXML(
                           XMLTYPE(
                                   CURSOR(
                                          SELECT  ENAME,
                                                  SAL
                                            FROM  EMP
                                            WHERE DEPTNO = 10
                          '//ROW',
                          XMLTYPE('<ROW><ENAME>user631757</ENAME><SAL>10000</SAL></ROW>')
                         ) EMP_XML
      FROM  DUAL
    EMP_XML
    <?xml version="1.0"?><ROWSET><ROW><ENAME>CLARK</ENAME><SAL>2450</SAL><ROW><ENAME
    user631757</ENAME><SAL>10000</SAL></ROW></ROW><ROW><ENAME>KING</ENAME><SAL>5000</SAL><ROW><ENAME>user631757</ENAME><SAL>10000</SAL></ROW></ROW><ROW><ENAME>MILL
    ER</ENAME><SAL>1300</SAL><ROW><ENAME>user631757</ENAME><SAL>10000</SAL></ROW></R
    OW></ROWSET>
    SELECT  INSERTXMLBEFORE(
                            XMLTYPE(
                                    CURSOR(
                                           SELECT  ENAME,
                                                   SAL
                                             FROM  EMP
                                             WHERE DEPTNO = 10
                           '//ROW[ENAME="KING"]',
                           XMLTYPE('<ROW><ENAME>user631757</ENAME><SAL>10000</SAL></ROW>')
                          ) EMP_XML
      FROM  DUAL
    EMP_XML
    <?xml version="1.0"?><ROWSET><ROW><ENAME>CLARK</ENAME><SAL>2450</SAL></ROW><ROW>
    <ENAME>user631757</ENAME><SAL>10000</SAL></ROW><ROW><ENAME>KING</ENAME><SAL>5000
    </SAL></ROW><ROW><ENAME>MILLER</ENAME><SAL>1300</SAL></ROW></ROWSET>
    SQL> SY.

  • Original xml from child nodes

    I need to be able to get a String with the original xml for all the child nodes once I traverse a DOM tree and find a particular node.

    Use the method suggested above, but unless you've done it before it might not be obvious how to get it into a string.
    Here's the trick:
    // Create a StringWriter
    StringWriter sw = new StringWriter();
    // Wrap the StringWriter with a PrintWriter
    PrintWriter pw = new PrintWriter(sw);
    // Print the node, passing the printwriter
    yourNode.print(pw);
    // Retrieve the string result from the underlying stringwriter
    String theXMLText = sw.toString();

  • XML E4X Select nodes based on child node attribute.

    Hey,
    I am trying to make a selection on following XML.
    I want to retrieve a list of the variable node when its child nodes metadata attribute "name" is not equal to "transient". I have read through the documentation but have not been able to solve this and it should be rather simple. So far I have tried with something like.
    var variables:XMLList = classInfo.variable.(metadata.(@name != "transient"));
    var variables:XMLList = classInfo.variable.(metadata.@name != "transient");
    But it returns all variable nodes.
    <type name="com.sca.dataModel::PresentationDataEntity" base="com.sca.dataModel::BaseEntity" isDynamic="false" isFinal="false" isStatic="false">
      <extendsClass type="com.sca.dataModel::BaseEntity"/>
      <extendsClass type="Object"/>
      <variable name="subtitle" type="String">
        <metadata name="__go_to_definition_help">
          <arg key="file" value="/Users/jonas/projects/SCA-CMS/src/com/sca/dataModel/PresentationDataEntity.as"/>
          <arg key="pos" value="128"/>
        </metadata>
      </variable>
      <variable name="id" type="Number">
        <metadata name="__go_to_definition_help">
          <arg key="file" value="/Users/jonas/projects/SCA-CMS/src/com/sca/dataModel/BaseEntity.as"/>
          <arg key="pos" value="153"/>
        </metadata>
      </variable>
      <variable name="tableName" type="String">
        <metadata name="transient"/>
        <metadata name="__go_to_definition_help">
          <arg key="file" value="/Users/jonas/projects/SCA-CMS/src/com/sca/dataModel/BaseEntity.as"/>
          <arg key="pos" value="118"/>
        </metadata>
      </variable>
      <variable name="db_SortAsc" type="Boolean">
        <metadata name="transient"/>
        <metadata name="__go_to_definition_help">
          <arg key="file" value="/Users/jonas/projects/SCA-CMS/src/com/sca/dataModel/BaseEntity.as"/>
          <arg key="pos" value="281"/>
        </metadata>
      </variable>
      <variable name="title" type="String">
        <metadata name="__go_to_definition_help">
          <arg key="file" value="/Users/jonas/projects/SCA-CMS/src/com/sca/dataModel/PresentationDataEntity.as"/>
          <arg key="pos" value="100"/>
        </metadata>
      </variable>
      <method name="setData" declaredBy="com.sca.dataModel::BaseEntity" returnType="*">
        <parameter index="1" type="Object" optional="false"/>
        <metadata name="__go_to_definition_help">
          <arg key="file" value="/Users/jonas/projects/SCA-CMS/src/com/sca/dataModel/BaseEntity.as"/>
          <arg key="pos" value="330"/>
        </metadata>
      </method>
      <metadata name="__go_to_ctor_definition_help">
        <arg key="file" value="/Users/jonas/projects/SCA-CMS/src/com/sca/dataModel/PresentationDataEntity.as"/>
        <arg key="pos" value="167"/>
      </metadata>
      <metadata name="__go_to_definition_help">
        <arg key="file" value="/Users/jonas/projects/SCA-CMS/src/com/sca/dataModel/PresentationDataEntity.as"/>
        <arg key="pos" value="42"/>
      </metadata>
    </type>

    Perfect, that worked!
    Thanks.
    Jonas

Maybe you are looking for

  • Petstore 1.3 with Oracle 8.1.7 on Solaris 9 - deployment error

    Hello, I'm trying to get Petstore 1.3 shipped with WebLogic Server 7.0 to work with Oracle 8.1.7 on Solaris 9 with a third-party (Oracle) jdbc driver (classes12). I did the following: 1) created a new connection pool with the correct Oracle database

  • SQL script based on hostname and database name?

    I am trying to write a script that I can run on several unix servers and databases that will do different sql statements based on which server and database it is being run in. Something like: if hostname = 'A' and database name = 'D' then do this els

  • Dbms_scheduler

    hi ,      what's up,guys?i need your favor,i scheduled my materialized view for refreshing using dbms_scheduler but it is not updating my view whenever there is an update in my table,kindly help. thanks in advance. sql>CREATE MATERIALIZED VIEW LOG ON

  • Client handoff and Roaming

    Hi all, I've installed four WLC 5.1.151.0 and the clients have roaming issues. When a client roams i can see it as "Mobility Role: Anchor" on the first WLC it connected and as "Mobility Role: Foreign" on the WLC it roamed to. The problem is after the

  • Site looks horrible in Internet Explorer

    Hi, New to the forums and to dreamweaver.  Just got finisted designing my site.  Tested it on firefox and safari.... looks great, however horrible on interenet explorer.  If any one could help it would be much appreciated it.  Pasted the code below.