Reorder an xmltype variable in plsql

I have an xml package sitiing in an xmltype variable.
Does anyone know a way I can reorder the nodes alphabetically?
Many Thanks
Paul

I can't post the xml.
The forum just keeps saying content is not allowed.Use {code} tags to enclose any code snippets you want to post. It'll preserve formatting and prevent content to be interpreted on the page.
It's explained here : http://forums.oracle.com/forums/help.jspa
Does this work for you :
SQL> set serveroutput on
SQL>
SQL> DECLARE
  2 
  3   doc xmltype := xmltype(
  4   '<root>
  5  <things>bbb
  6  <somestuff>1234</somestuff>
  7  <morestuff>5678</morestuff>
  8  </things>
  9  <things>aaa
10  <somestuff>dog</somestuff>
11  <morestuff>cat</morestuff>
12  </things>
13  </root>'
14   );
15 
16   ordered_doc xmltype;
17 
18  BEGIN
19 
20   select xmlquery(
21   'for $i in $d/*
22    return element {name($i)}
23    {
24     for $j in $i/things
25     order by $j/text()
26     return $j
27    }'
28    passing doc as "d"
29    returning content
30   )
31   into ordered_doc
32   from dual;
33 
34   dbms_output.put_line(ordered_doc.getclobval());
35 
36  END;
37  /
<root><things>aaa
<somestuff>dog</somestuff>
  <morestuff>cat</morestuff>
</things>
<things>bbb
<somestuff>1234</somestuff>
  <morestuff>5678</morestuff>
</things>
</root>
PL/SQL procedure successfully completed
The first "for" in the XQuery is there in case you don't want to hardcode the root element.

Similar Messages

  • XQUERY against an XMLTYPE variable

    I have a procedure which gets xmltype instance and i have to use xquery upon that variable.
    declare
    myxml xmltype;
    s varchar2(20);
    begin
    myxml:=xmltype('<person><name id="1" age="23"/><name id="2" age="25"/></person>');
    SELECT
    XMLQuery(
    'for $i in /person
    where $i/age > 24
    return $i/id'
    PASSING myxml RETURNING CONTENT) into s
    FROM DUAL;
    end;
    BUT i get this error
    ORA-06550: line 6, column 1:
    PLS-00801: internal error [*** ASSERT at file pdw4.c, line  793; Cannot coerce
    between type 43 and type 30; anon_68F441E0__AB[6, 1]]
    Please help it is urgent

    Not sure if you ever received your answer regarding how to pass an XMLType variable in PLSQL to an XQuery command.
    Here is an example of what I've been using... in Oracle 10.2.0.1
    SET SERVEROUTPUT ON SIZE 200000
    DECLARE
    l_result XMLType;
    l_xxDoc XMLType := XMLType(
    <root>
    <things>
    <somestuff>12345</somestuff>
    <morestuff>12345</morestuff>
    </things>
    <things>
    <somestuff>dfgdfg</somestuff>
    <morestuff>werwer</morestuff>
    </things>
    </root>
    PROCEDURE printClobOut
    (p_result IN CLOB)
    IS
    v_xmlstr VARCHAR2(32767);
    v_line VARCHAR2(2000);
    BEGIN
    v_xmlstr := DBMS_LOB.SUBSTR(p_result,32767);
    LOOP
    EXIT WHEN v_xmlstr IS NULL;
    v_line := SUBSTR(v_xmlstr,1,INSTR(v_xmlstr,CHR(10))-1);
    DBMS_OUTPUT.PUT_LINE('| '||v_line);
    v_xmlstr := SUBSTR(v_xmlstr,INSTR(v_xmlstr,CHR(10))+1);
    END LOOP;
    END;
    BEGIN
    select XMLQUERY(
    'for $a in $TheDoc/root
    return <theresult>
    {$a/things}
    </theresult>
    PASSING l_xxDoc as "TheDoc"
    RETURNING CONTENT) into l_result
    from dual;
    printClobOut(l_result.extract('/').getClobVal());
    END;
    Kevin

  • Updatexml on xmltype variable

    Is there a way to update the XML in an xmltype variable?
    I don't want to have to use the sql commands update ... set that constrain me to changing XML already stored in a table.
    For example this is what I would like to do. If I have the following XML in clob vXmlClob
    <Action>
    <User>SVOLLMAN</User>
    </Action>
    I want to change the user to Dave...
    declare
    vXmlType xmltype;
    vXmlClob clob;
    begin
    vXmlType := xmltype(vXmlClob);
    vXmlType := xmlType.updatexml('Action/User','Dave');
    end;
    Of course this does not work but is there another way of updating the XML in my variable. Or maybe I am looking at this the wrong way - is there any way of using the update ... set sql commands without having the XML already in a table.

    You mean this?:
    michaels>  select xml, updatexml (d.xml, 'Action/User/text()', 'Dave') updated_xml
      from (select xmltype ('<Action><User>SVOLLMAN</User></Action>') xml from dual) d
    XML                                        UPDATED_XML                          
    <Action><User>SVOLLMAN</User></Action>     <Action><User>Dave</User></Action>                                                                                        

  • Is it possible to concatenate XMLType variable

    I'm using XQuery to query relational table and store the result into an xmltype variable as shown below:
    SELECT XMLQuery('<Data>
    {for $c in ora:view("TABLEA")
           let $id := $c/ROW/ID/text(), $code := $c/ROW/CODE/text(),
               return
           <result>
             <type>I</type>
             <id>{$id}</id>
    <code>{$code}</code>
    </result> </Data>' RETURNING CONTENT)
    INTO V_Delete FROM dual;
    Similarly, I query other tables and store the result in xmltype variable. My requirement is to generate one xml file out of it. This would mean that I would need to consolidate the values stored in different xmltype variables. Is it possible to concatenate the xmltype varialbe? If so, how? If not, what is the alternative? I tried converting it to string, but then the 4000 limit caused an error.

    Hi, as I said I have not done that myself. But you can read chapter 4 of the XDB Developer's Guide of the Oraclce docs and I think it may help. The examples there show that those functions are used to update a table. It has this example,
    UPDATE purchaseorder
    SET OBJECT_VALUE =
    appendChildXML(OBJECT_VALUE,
    '/PurchaseOrder/Actions/Action[1]',
    XMLType('<Date>2002-11-04</Date>'))
    WHERE existsNode(OBJECT_VALUE,
    '/PurchaseOrder[Reference="AMCEWEN-20021009123336171PDT"]')
    = 1;
    SELECT extract(OBJECT_VALUE, '/PurchaseOrder/Actions/Action[1]')
    FROM purchaseorder
    WHERE existsNode(OBJECT_VALUE,
    '/PurchaseOrder[Reference="AMCEWEN-20021009123336171PDT"]')
    = 1;
    That was why I thought using a global temp table would help in this kind of operation. What I did was using select xmlelement(namespace declarations) from dual, then using a nested (select xmlelement() ) inside the from dual part. I have to select from many different tables to create one xml and it works for me, but I did not try the other ways. If you just need to attach the prolog and namespace stuff, you can store them in a clob or varchar2 var and convert the xml to clob and that simply concantenate them, and then convert the clob back to xml. In 10g there is also the new XMLProlog (I forgot the exact name at this moment) function. Check that out and see if it will work for you.
    ben

  • Appending XML Node to XMLTYPE Variable

    Hi All,
    My Database Details,
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    PL/SQL Release 9.2.0.1.0 - Production
    CORE 9.2.0.1.0 Production
    TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
    NLSRTL Version 9.2.0.1.0 - Production
    SQL> var mycnt number
    SQL> exec :mycnt := 2
    SQL> declare
    xml xmltype := xmltype('
    <EMP>
    <NAME>
    </NAME>
    <SALARY>
    <DATE></DATE>
    <AMOUNT></AMOUNT>
    </SALARY>
    </EMP>');
    l_sal long := '<SALARY><DATE></DATE><AMOUNT></AMOUNT></SALARY>';
    l_str long;
    begin for i in 1 .. :mycnt
    loop
    l_str := l_str || l_sal;
    end loop;
    xml := xmltype(replace (xml.getstringval(), '</EMP>', l_str || '</EMP>'));
    dbms_output.put_line (xml.extract('.').getstringval());
    end;
    <EMP>
    <NAME/>
    <SALARY>
    <DATE/>
    <AMOUNT/>
    </SALARY>
    <SALARY>
    <DATE/>
    <AMOUNT/>
    </SALARY>
    <SALARY>
    <DATE/>
    <AMOUNT/>
    </SALARY>
    </EMP>
    This program is working fine. Consider the following scenario...
    My XML is like this,
    <ABC>
    <AB> -- First element
    <CCC></CCC>
    </AB>
    <AB> -- Second element
    <CCC></CCC>
    </AB>
    </ABC>
    Now i want to replicate the tag of <CCC></CCC>
    to 'N' TIMES from XPATH = /A/AB[1]/CCC and /A/AB[2]/CCC
    For example if N=3 then, the XML should be,
    <ABC>
    <AB>
    <CCC></CCC>
    <CCC></CCC>
    <CCC></CCC>
    </AB>
    <AB>
    <CCC></CCC>
    <CCC></CCC>
    <CCC></CCC>
    </AB>
    </ABC>
    Please provide me some Sample PLSQL code for this,
    Thanks in Advance,
    Simbhu

    not sure that this is waht you want - but maybe you find smth useful:
    SQL> set serveroutput on;
    SQL>
    SQL> declare str xmltype:=xmltype('<ABC><AB><CCC></CCC></AB><AB><CCC></CCC></AB><AB><CCC></CCC></AB></ABC>');
      2  begin
      3  for i in 1..2
      4  loop
      5  select InsertChildXML(str, '/ABC/AB['||i||']', 'CCC', XMLForest('' as "CCC",'' as "CCC")) into str from dual;
      6  end loop;
      7  dbms_output.put_line(str.extract('.').getstringval());
      8  end;
      9  /
    <ABC>
      <AB>
        <CCC/>
        <CCC/>
        <CCC/>
      </AB>
      <AB>
        <CCC/>
        <CCC/>
        <CCC/>
      </AB>
      <AB>
        <CCC/>
      </AB>
    </ABC>
    PL/SQL procedure successfully completed
    SQL>

  • XMLTYPE variable converting to XML (Question)

    Friends,
    I am stuck on an error and cannot find a way out. Please help. I know it's a long question but a very simple answer to many smart people here. I am just lost and need your help. (I am new to SOA so bear with me)
    I have a BPEL process which invokes a PL/SQL API which returns the XMLTYPE output which has the XML data. In order to convert the XMLTYPE to normal XML I do following :-
    - I added a Java embed activity in BPEL with following code (Invoke_new_get_customer_order_info_OutputVariable','OutputParameters','/ns2:OutputParameters/ns2:X_CUSTOMER_ORDER_INFO_XML is the XMLTYPE)
    (responsePayoad is string variable)
    try{                                                           
    Node node = (Node)getVariableData("Invoke_new_get_customer_order_info_OutputVariable','OutputParameters','/ns2:OutputParameters/ns2:X_CUSTOMER_ORDER_INFO_XML");
    Node childNode = (Node) node.getFirstChild();
    StringWriter writer = new StringWriter();
    Transformer transformer = TransformerFactory.newInstance().newTransformer();
    transformer.transform(new DOMSource(childNode), new StreamResult(writer));
    String xml = writer.toString();
    String nsXML = xml.replaceFirst("<FetchCustomerInfoResponse","<FetchCustomerInfoResponse xmlns=\"http://xmlns.djoglobal.com/OrderTracking/CustomerInfo\" ");
    setVariableData("responsePayload",nsXML);
    addAuditTrailEntry("XML with Namespace: " + nsXML);
    } catch(Exception e){                            
    addAuditTrailEntry(e);
    System.out.println("Namespace injection failed due to : " + e);
    After above I have ASSIGN activity where I use parsexml function on the "responsePayload" variable to assign to a variable of type element which refers to following xsd. This is where I get an "internal xpath error" during runtime which I cannot resolve.
    XSD of the element variable refering to "FetchCustomerInfoResponse" element
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.example.org"
    targetNamespace="http://xmlns.djoglobal.com/OrderTracking/DJOFetchCustomerOrderInfo"
    elementFormDefault="qualified">
    <xsd:element name="FetchCustomerInfoResponse">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="DJO_ONT_ACCOUNT_ORDERS">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="DJO_ONT_ACCOUNT_ORDER" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:attribute name="ordered_date" type="xsd:string"/>
    <xsd:attribute name="cust_po_number" type="xsd:string"/>
    <xsd:attribute name="order_number" type="xsd:integer"/>
    <xsd:attribute name="header_id" type="xsd:integer"/>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    XML returned in the XMLTYPE from the PL/SQL API :-
    <Invoke_new_get_customer_order_info_OutputVariable><part name="OutputParameters" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/XXDJO_ONT_ORDER_TRACKING_WS/GET_CUSTOMER_ORDER_INFO_XML/"><X_CUSTOMER_ORDER_INFO_XML>
    <FetchCustomerInfoResponse xmlns="">
    <DJO_ONT_ACCOUNT_ORDERS>
    <DJO_ONT_ACCOUNT_ORDER ordered_date="24-APR-12" cust_po_number="PO1" order_number="123456" header_id="7777777"/>
    <DJO_ONT_ACCOUNT_ORDER ordered_date="19-APR-12" cust_po_number="PO2" order_number="4545454" header_id="888888"/>
    <DJO_ONT_ACCOUNT_ORDER ordered_date="09-APR-12" cust_po_number="PO3" order_number="56565656" header_id="999999"/>
    </FetchCustomerInfoResponse>
    </X_CUSTOMER_ORDER_INFO_XML>
    </OutputParameters></part></Invoke_new_get_customer_order_info_OutputVariable></messages>
    Any help is greatly appreciated as this is driving me nuts.
    Thanks

    Few modifications,
    1. Initialize your int count to 0, int count=0;
    2. Write count++; as the first statement in your for loop. 3. Remove count++; at the bottom.
    4. Add a hidden field to your form (after submit button, but before your </form> tag)
    <input type="hidden" name="qCount" value="<%=count%>">
    Now use this code,
    writeXML.jsp
    <%
    int qCount = Integer.parseInt(request.getParameter("qCount"));
    String home ="C:\\Tomcat\\FYProject\\lib\\";
    String filename = request.getParameter("file");
    String extension = ".xml";
    String filePath = home + filename + extension;
    BufferedWriter bw = new BufferedWriter(new FileWriter(filePath,true));
    bw.write("<mc_QuestionType>");
    bw.newLine();
    for(int count=0;count<qCount;count++) {
         String Tquestion = request.getParameter("questionText"+count);
         String answer1 = request.getParameter("choice_1"+count);
         String answer2 = request.getParameter("choice_2"+count);
         String answer3 = request.getParameter("choice_3"+count);
         String answer4 = request.getParameter("choice_4"+count);
         String Canswer = request.getParameter("cAnswer"+count);
         bw.write(" <questionText>" Tquestion "</questionText>");
         bw.newLine();
         bw.write(" <choice>" answer1 "</choice>");
         bw.newLine();
         bw.write(" <choice>" answer2 "</choice>");
         bw.newLine();
         bw.write(" <choice>" answer3 "</choice>");
         bw.newLine();
         bw.write(" <choice>" answer4 "</choice><br>");
         bw.newLine();
         bw.newLine();
         bw.write(" <answer>" Canswer "</answer>");
         bw.newLine();
         bw.write("</mc_QuestionType>");
         bw.close();
    %>Hope this works.
    Sudha

  • Getting oracle environment variables using plsql code

    Hi Geeks,
    Can anyone tell me how to get an Oracle environment variable (eg db_cache_size) from inside a plsql block of code or through a sql query?
    Thanks,
    Prabhu

    Is it possible to update the values via SQL?That's indicated by:
    ISSES_MODIFIABLE VARCHAR2(5) Indicates whether the parameter can be changed with ALTER SESSION (TRUE) or not (FALSE)
    ISSYS_MODIFIABLE VARCHAR2(9) Indicates whether the parameter can be changed with ALTER SYSTEM and when the change takes effect:
    See the docs:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2012.htm#REFRN30176

  • Javascript variable in plsql- Addition

    I forgot to mention that I am doing this on a dynamic page so I can use both plsql and javascript.

    I would suggest that you do a generic Javascript call
    with HTML
    <javascript scr="URL to PLSQL package?encoded data">
    You can then pass what variables you are needing to pass to the Database as well as return a java script based on the encoded data if needed.
    Another avenue would be to have a plsql page that would redirect the person to another url there are wanting. While generating the needed refresh META tag you could update a table with needed information.
    I hope these two ideas will help.
    Christopher
    billboard.net
    www.billboard.net

  • How to pass javascript variable to PLSQL stored procedure

    Hi,
    How can I pass a javascript variable to a database procedure. I have a form with a radio button group and would like to save the value of the selected radio button to a database table by passing the value to the stored procedure.
    Thanks

    Hi
    You can use iframe to call the procedure. Here is an example used in dynamic page or pl/sql portlet. The pl/sql procedure is called myprocedure and resists in the schema myschema. This example passes 2 parameters, but I have not yet reased a limit.
    First the call within a javascript function:
    myiframe.location.href="myschema.myprocedure?p_myprameter1=" + vJvascriptparameter1 + "&p_myprameter2=" + vJvascriptparameter2;
    Then the iframe:
    <iframe id="myiframe" height="0" width="0" frameborder="0"></iframe>
    You can let the pl/sql procedure print a value, that can be used i the portlet. You can get the value in a javascript this way:
    myvalue=top.window.frames["myiframe"].document.body.innerHTML;
    Best regards
    Klaus

  • Printing ?xml version="1.0"..? tag in xmltype variable

    I created the xmltype "result" by using xmlelement and xmlforest functions in a select query.
    Now I need to add the "<?xml version="1.0" encoding="utf-8"?>" to the xmltype.
    I tried manipulating the clob (result.getclobval()) using dbms_lob.append() ,dbms_lob.write() and dbms_lob.writeappend() functions in various combinations,but nothing seems to work.
    Can anyone help me with this?
    Thanks,
    Aditi

    Hi,
    I want to strip it off because I am apppending the same in a Java Program.
    Please let me know how can it be done.
    Appreciate your inputs.
    Thanks,
    Dibya

  • How to get value of variable in plsql

    Hi All,
    I have one scenario to find the value of variable:
    A varchar2(10) := 'Y';
    B varchar2(10) := 'N';
    C varchar2(10) := 'AB';
    D VARCHAR2(10);
    now my question is that how can i fetch value from A and B in D by C.
    The value of D should be equal to YN.
    Thx in advance..
    Edited by: user00001 on 26-Apr-2010 03:42

    d := CASE c
           WHEN 'A' THEN a;
           WHEN 'B' THEN b;
           WHEN 'AB' THEN a || b;
           ELSE NULL;
         END;

  • Accepting UNIX variable in PLSQL block

    Hi,
    I wanted to send shell variable to a PL/SQL block in a SHELL script. ?How to achieve this?
    I am using Korn Shell.
    Thanks & Regards
    LAKSHMI

    Send the parameters to sqlplus and access them
    ================================
    This call
    ================================
    C:\Temp>sqlplus issues/issues@air @t.sql Parameter1
    ================================
    Makes this
    ================================
    SQL*Plus: Release 8.0.6.0.0 - Production on Mon May 6 12:48:54 2002
    (c) Copyright 1999 Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.0.0 - Production
    SQL> BEGIN
      2      DBMS_OUTPUT.Put_Line ('HI &1');
      3  END;
      4  /
    old   2:     DBMS_OUTPUT.Put_Line ('HI &1');
    new   2:     DBMS_OUTPUT.Put_Line ('HI Parameter1');
    PL/SQL procedure successfully completed.
    SQL>
    SQL>
    SQL>
    SQL> /*
    DOC>
    DOC>set serveroutput on size 1000000
    DOC>clear screen
    DOC>@c:\temp\t.sql
    DOC>
    DOC>*/
    SQL>

  • Selective extraction from an xmltype variable

    I have a fragment of XML -
    <Unit name="MAIN UNIT">
    <Ops event_type="U1" cause_code="7050" begin_time="2003-06-13T09:38:00">Broken restoring cable</Ops>
         <Ops event_type="GE" cause_code="0001" begin_time="2003-06-03T07:07:03"/>
    <Generation begin_time="2003-06-13T00:00:00" end_time="2003-06-13T23:59:59" mwh_produced="229.00" mwh_consumed="0.00"/>
    </Unit>
    I am trying to extract just the text of an "Ops" fragment. In the above case, the first would be "Broken restoring cable" and the second would be NULL. Using
    v_belement.extract('/Ops').getStringVal()
    inside of a loop through the array gives me the entire fragment. How can I get just the text?
    Bill

    Bill,
    Try extractValue instead of extract.
    Bharathi

  • Is it possible to add variable defined as xmltype to an xmldom node?

    Hi,
    I'm trying to produce a complex XML document that doesn't lend itself well to using SQL XML functions (xmlagg, xmlelement, etc.) because various disparate data needs to be pulled together via seperate queries and then stuck into the final document in the correct spots.
    So I've resorted to using the convoluted pl/sql xmldom functions. What I'm wondering though is if it is possible to take data in an xmltype variable and somehow append it as a node within my xml document? Something as in the following pseudo code:
    begin
    doc := xmldom.newDOMDocument;
    main_node := xmldom.makeNode (doc);
    select xmlelement("Address",...) -- more xmlelements containing related address info (street, city, etc.)
    into l_address
    from ...;
    new_node := xmldom.appendChild (main_node, xmldom.makeNode (l_address));
    end;
    If possible, this would save me a tremendous amount of time from having to code every element and attributes via the xmldom functions.
    Thanks,
    Alan

    I've done the same scenario you are describing, shove XML defined in an XMLType into a DOMDocument. I munged the code to hide system specific references so the code works, just not as pasted here. The document is being built in o_response_doc and goes after the node previously built in l_rsp_msg_nd. The input is l_xmltype. May be a better way but I never found one and came up with this based on the Oracle documentation and trial and error.
        -- Convert the XMLType to a DOMDocument so we can extract the needed node
        --  and insert it into the response DOMDocument
        l_temp_domdoc := dbms_xmldom.newdomdocument(l_xmltype);
        l_inq_nodelist := dbms_xmldom.getelementsbytagname(l_temp_domdoc,
                                                           'DesiredXMLTypeNodeName');
        l_inq_nl_len := xmldom.getlength(l_inq_nodelist);
        IF l_inq_nl_len > 0 THEN
           -- Take the node above and adopt it into the response document
           l_temp2_nd := dbms_xmldom.importNode(o_response_doc,
                                                dbms_xmldom.item(l_inq_nodelist, 0),
                                                TRUE);
           -- Remove the a: namespace that was autoadded.  (this was defined in the l_xmltype XML)
           dbms_xmldom.removeattribute(dbms_xmldom.makeelement(l_temp2_nd),
                                       <ns_pfx>,
                                       <ns_uri>);
           -- Put the node in the correct position in the response document                                          
           l_temp2_nd := xdb.dbms_xmldom.appendChild(l_rsp_msg_nd, l_temp2_nd);
        END IF;
        dbms_xmldom.freeDocument(l_temp_domdoc);

  • Extract array elements using plsql

    I have an XMLTYPE variable containing the following SOAP envelope:
    <?xml version="1.0" encoding="US-ASCII"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
    <soapenv:Body>
    <ns1:cleanseAddressResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:dbCleanseSoapBinding">
    <ns1:cleanseAddressReturn xsi:type="soapenc:Array" soapenc:arrayType="ns2:string[5]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://www.w3.org/2001/XMLSchema">
    <item>1369 S 325 E STE 2323</item>
    <item/>
    <item>BOUNTIFUL</item>
    <item>UT</item>
    <item>84010</item>
    </ns1:cleanseAddressReturn>
    </ns1:cleanseAddressResponse>
    </soapenv:Body>
    </soapenv:Envelope>
    How can I extract individual values of ITEM using PLSQL? I can't seem to be able to extract anything out of this without raising ORA-30625 "method dispatch on NULL SELF argument is disallowed"

    You can create XMLSEQUENCE() from the extract() function and they get the value out.
    Or you can use the //item[1]/text() //item[2]/text().
    Does this make sense to you?

Maybe you are looking for

  • Will any mail apps open to the inbox by default?

    I have been using computers for decades...and have had my iPhone for a few years now. It was only a few days ago that I got my first iPad and was surprised by the "feature" that all of the mail apps seem offer... I am talking about opening the app to

  • DTP does not fetch all records from Source, fetches only records in First Data Package.

    Fellas, I have a scenario in my BW system, where I pull data from a source using a Direct Access DTP. (Does not extract from PSA, extracts from Source) The Source is a table from the Oracle DB and using a datasource and a Direct Access DTP, I pull da

  • BO 4.0 Repository diagnostic tool-ora 12154.TNS could not resolve the connect identifier specified

    Hi All, I'm trying to run RDT on BO 4.0 using the following command on <INSTALLDIR>\SAP BusinessObjects Enterprise XI 4.0\win64_x64: reposcan.exe -dbdriver oracledatabasesubsystem -connect "UID=ceprod;PWD=ceprod;DSN=dsnname;HOSTNAME=ip of db server;P

  • Batch issue were all are blanks

    Hello We are having some kind of regression issue with batches here, as this was not impacting us from the R3 (execution) side we didnt notice this impact until now the impact is really from the APO side eventhough the source of this issue is from th

  • Dr. Smoke,Kappy, Neil & Sampson!

    It's gonna take Dr. Smoke, Kappy, Neil & Sampson to solve this problem! I've seen it posted here and on the internet and NO ONE has ever solved it. I (and the other's who have posted) have been burning CDs & DVDs with no problems from the day we boug