Analysis the xml response from PL/SQL

Can someone please help me to analyze the XML below?

DECLARE

l_response CLOB.

g_system_id VARCHAR2 (255);

g_session_id VARCHAR2 (255);

g_user_id VARCHAR2 (255);

BEGIN

l_response: =.

' - uuid:18cb22a2 - 11cc-43f4-bfea-c213da179d30 + id = 156

Content-ID: http://tempuri.org/0 >

Content-Transfer-Encoding: 8 bit

Content-Type: application/xop + xml; charset = utf-8; Type = "application/soap + xml".

" < s: Envelope = xmlns:s ' http://www.w3.org/2003/05/soap-envelope "" xmlns: a = " " http://www.w3.org/2005/08/addressing ' > < s:Header > < a: s:mustUnderstand Action = "1" > ". http://tempuri.org/ILoginService/LoginByUserNameResponse " < / has: Action > < a: RelatesTo > urn: uuid:cf410a05 - 23 d 4 - 4B 92-a22c-329cbc19fbe7 < / has: RelatesTo > < / s:Header > < Body > < LoginByUserNameResponse xmlns =" http://tempuri.org/ ' > < LoginByUserNameResult xmlns:i = ' http://www.w3.org/2001/XMLSchema-instance "" xmlns: x = " " http://www.w3.org/2001/XMLSchema ' > < XObject.m_element i: type = "x: string" xmlns = "" > & lt; OnlineContext SystemId = "{19E0DDB4-5FA5-41EE-B624-AEA762865A6C}" SessionId = username "{F23D32A4-B325-4BFA-9E90-39CA253E843C}" = "{2C6ABE4C-D356-46F0-B4BE-9C4F0A36A522}" / & gt; < XObject.m_element > < / LoginByUserNameResult > < / LoginByUserNameResponse > < / Body > < / s: Envelope >

-uuid: 18cb22a2-11cc-43f4-bfea-c213da179d30 + id = 156-';

SELECT systemid, sessionid, userid

IN g_session_id, g_system_id, g_user_id

FROM XMLTABLE)

xmlnamespaces ('http://www.w3.org/2003/05/soap-envelope' 'DATA'),

'data:LoginByUserNameResponse/LoginByUserNameResult/XObject.m_element/OnlineContext '.

PASSAGE xmltype (l_response)

Systemid VARCHAR2 COLUMNS (50) PATH "@OnlineContext."

SessionId VARCHAR2 (50) PATH "@OnlineContext."

UserID VARCHAR2 (50) PATH "@OnlineContext") xt;

Dbms_output.put_line)

"Session Id".

|| g_session_id

|| "System Id".

|| g_system_id

|| "User Id".

|| g_user_id);

END;

Thank you.

It gets you a little closer

declare
-- Local variables here
l_response     CLOB;
g_system_id    VARCHAR2 (255);
g_session_id   VARCHAR2 (255);
g_user_id      VARCHAR2 (255); 

begin
-- Test statements here
l_response := '

    http://tempuri.org/ILoginService/LoginByUserNameResponse
    urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7


    
       
          
          
      
  
'; 

    SELECT systemid, sessionid, userid
      INTO g_session_id, g_system_id, g_user_id
      FROM XMLTABLE (
              xmlnamespaces ('http://www.w3.org/2003/05/soap-envelope' AS "s",
                             'http://tempuri.org/' as "data"),
              's:Envelope/s:Body/data:LoginByUserNameResponse/data:LoginByUserNameResult/XObject.m_element/OnlineContext'
              PASSING xmltype (l_response)
              COLUMNS systemid VARCHAR2 (50) PATH '@SystemId',
                      sessionid VARCHAR2 (50) PATH '@SessionId',
                      userid VARCHAR2 (50) PATH '@UserId') xt; 

DBMS_OUTPUT.put_line (
       'Session id '
    || g_session_id
    || ' System id '
    || g_system_id
    || ' User id '
    || g_user_id); 

end;     

You will need to manually parse as CLOB and pull the XML itself of the response string.  This can be done via SUBSTR and INSTR looking for the first < and="" last=""> in that you showed at least.  Upgrading from a previous version of working correctly with the xmlns = "", which redefines the default namespace to the default value. "  The XPath has been corrected to reflect using the appropriate prefix.

Tags: Oracle Development

Similar Questions

  • Problem in the analysis of XML response.

    Hello

    I want to parse the XML response like this:

    http://www.Google.co.in/imgres?imgurl=&imgrefurl=http%3A%2f%2Fwww.SimpleDNS.com%2Fkb.aspx%3Fkbid%3D1...

    Can someone help me?

    Found the solution!

    http://StackOverflow.com/questions/16053621/reading-XML-file-content-in-Java

  • Navigate trough different 'levels' in the XML file from the known item?

    I am quite new to this, so I have to ask even if it's a stupid question...

    I am trying to build a generic oracle procedure that can insert data into a table from a file XML so that message that it contains, but of course the messages has the same structure.

    I need to find the first item after data, in this case "CUS_ORD_HEAD", but it could be any message as PO_HEAD.
    So I need to somehow find the element without knowledge is the name of the element. It goes same for CUS_ORD_LINE that might be PO_LINE. Is it possible to navigate through the different 'levels' in the XML file from a known element.

    < CustomerOrder >
    < metadata >
    < TransActionIdentity > 1 < / TransActionIdentity >
    < / metadata >
    < data >
    < Client CUS_ORD_HEAD = 'ABC' CustomerOrderNumber '1234' = >
    < CUS_ORD_LINE CustomerOrderNumber = "1234" OrderedQuantity = "10" ProductNumber = "1001403" CustomerOrderLinePosition = "1" / >
    < HAPI_CUS_ORD_LINE CustomerOrderNumber = "1234" OrderedQuantity = "1" ProductNumber = "2530" CustomerOrderLinePosition = "2" / >
    < CUS_ORD_LINE_TEXT CustomerOrderLinePosition = '2' Text = "Test" CUSTOMERORDERNUMBER = "1234" / >
    < / HAPI_CUS_ORD_HEAD >
    < / data >
    < / CustomerOrder >

    the tablename parameter is identical to the XML element and attributes are the same as the columns

    OK, understood.

    You can retrieve the name of the element and attribute names in the same time by using something like the following.
    Attribute names are stored in a collection that is accessible iteratively in order to build the dynamic parts of the query:

    SQL> CREATE OR REPLACE TYPE TColumnList IS TABLE OF VARCHAR2(30);
      2  /
    
    Type created
    
    SQL> set serveroutput on
    SQL>
    SQL> DECLARE
      2
      3   xmldoc   xmltype := xmltype('
      4  
      5  
      6  1
      7  
      8  
      9  
     10  
     11  
     12  
     13  
     14  
     15  
     16  
     17  ');
     18
     19   --t_column_list TColumnList := TColumnList();
     20   --v_table_name  VARCHAR2(30);
     21
     22   tmp_cols      VARCHAR2(1000);
     23   tmp_paths     VARCHAR2(1000);
     24   tmp_qry       VARCHAR2(4000);
     25
     26  BEGIN
     27
     28    FOR r IN (
     29      SELECT table_name
     30           , set(cast(collect(column_name) as TColumnList)) as column_list
     31      FROM XMLTable(
     32           'for $i in /CustomerOrder/Data/descendant::*
     33              , $j in $i/attribute::*
     34            return element e
     35            {
     36              element TABLE_NAME {name($i)}
     37            , element COLUMN_NAME {name($j)}
     38            }'
     39            passing xmldoc
     40            columns
     41              table_name   varchar2(30)
     42            , column_name  varchar2(30)
     43           )
     44      GROUP BY table_name
     45    )
     46    LOOP
     47
     48      tmp_cols := NULL;
     49      tmp_paths := NULL;
     50
     51      --dbms_output.put_line(r.table_name);
     52
     53      FOR i in 1 .. r.column_list.count LOOP
     54
     55        tmp_cols := tmp_cols || ', ' || r.column_list(i);
     56        tmp_paths := tmp_paths || ', ' || r.column_list(i) || ' varchar2(35) path ''@' || r.column_list(i) || '''';
     57
     58      END LOOP;
     59
     60      tmp_cols := ltrim(tmp_cols, ', ');
     61      tmp_paths := ltrim(tmp_paths, ', ');
     62
     63      tmp_qry := 'INSERT INTO ' || r.table_name || ' (' || tmp_cols || ') ' ||
     64                 'SELECT ' || tmp_cols ||
     65                 ' FROM XMLTable(''/CustomerOrder/Data/descendant::' || r.table_name || '''' ||
     66                 ' PASSING :1 ' ||
     67                 'COLUMNS ' || tmp_paths ||
     68                 ')';
     69
     70      dbms_output.put_line(tmp_qry);
     71
     72    END LOOP;
     73
     74  END;
     75  /
    
    INSERT INTO CUS_ORD_HEAD (CustomerOrderNumber, Customer) SELECT CustomerOrderNumber, Customer FROM XMLTable('/CustomerOrder/Data/descendant::CUS_ORD_HEAD' PASSING :1 COLUMNS CustomerOrderNumber varchar2(35) path '@CustomerOrderNumber', Customer varchar2(35) path '@Customer')
    INSERT INTO CUS_ORD_LINE (CustomerOrderNumber, OrderedQuantity, ProductNumber, CustomerOrderLinePosition) SELECT CustomerOrderNumber, OrderedQuantity, ProductNumber, CustomerOrderLinePosition FROM XMLTable('/CustomerOrder/Data/descendant::CUS_ORD_LINE' PASSING :1 COLUMNS CustomerOrderNumber varchar2(35) path '@CustomerOrderNumber', OrderedQuantity varchar2(35) path '@OrderedQuantity', ProductNumber varchar2(35) path '@ProductNumber', CustomerOrderLinePosition varchar2(35) path '@CustomerOrderLinePosition')
    INSERT INTO CUS_ORD_LINE_TEXT (CUSTOMERORDERNUMBER, Text, CustomerOrderLinePosition) SELECT CUSTOMERORDERNUMBER, Text, CustomerOrderLinePosition FROM XMLTable('/CustomerOrder/Data/descendant::CUS_ORD_LINE_TEXT' PASSING :1 COLUMNS CUSTOMERORDERNUMBER varchar2(35) path '@CUSTOMERORDERNUMBER', Text varchar2(35) path '@Text', CustomerOrderLinePosition varchar2(35) path '@CustomerOrderLinePosition')
    
    PL/SQL procedure successfully completed
     
    
  • receive the same response from the server - glued

    Hello

    I write a simple client/server application. I'm a little stuck on the same response from the server. Instead of sending and receiving plain text, I chose to wrap messages in the command objects (containing a statement and a list of values). He worked for a while, until I realized that I continue to create new objects for each request and response to and from the server. I thought that it's a waste, so I created a reset method (commands command) to update the same object instance instead of creating new command objects. And since I get the same response from the server.

    I've debugged client and the server, and I see that it is as if the server does not read a new order, but he is stuck on the last (which is the first).

    It's the class ServerThread run() method:
    @Override
        public void run() {
            try {
                out = new ObjectOutputStream(socket.getOutputStream());
                in = new ObjectInputStream(socket.getInputStream());
                Command fromClient = null, toClient = null;
                Protocol p = new Protocol();
                
                try {
                    //Reading input from Client
                    while ((fromClient = (Command) in.readObject()) != null) {
                        toClient = p.processInput(fromClient);
                        out.writeObject(toClient);
                        
                    }
                } catch (EOFException e) {
                    //Swallow this exception
                } catch (ClassNotFoundException e) {
                    e.printStackTrace();
                }
    
                out.close();
                in.close();
                socket.close();
                
            } catch (SocketException e) {
                //Swallow this exception
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
            }
        }
    It's the processInput (...) method of the class of Protocol:
    public Command processInput(Command fromClient) {
    
    
            if (fromClient.getCommand() == Commands.REQ_GREET_ME) {
                currentCommand.reset(Commands.REPLY);
                currentCommand.addValue(new Value("Welcome to the Aardenon server."));
    
            } else if (fromClient.getCommand() == Commands.REQ_PLAYER_COUNT) {
                currentCommand.reset(Commands.REPLY);
                currentCommand.addValue(new Value("There are " + AcceptorThread.threadCount() + " players online."));
    
            } else if {
                //Some other commands...
            }
            return currentCommand;
            
        }
    It's the method of hand (...) (shortcut) to the customer class:
    public static void main(String[] args) {
    
            ClientUI clientUI = new ClientUI();
            clientUI.printWelcome();
    
            Socket socket = null;
            ObjectOutputStream out = null;
            ObjectInputStream in = null;
            BufferedReader stdIn = null;
    
            try {
                socket = new Socket("localhost", PORT);
                if (socket != null) {
                    clientUI.printConEstablished();
    
                    out = new ObjectOutputStream(socket.getOutputStream());
                    in = new ObjectInputStream(socket.getInputStream());
                    stdIn = new BufferedReader(new InputStreamReader(System.in));
    
                    Command currentCommand;
                    CommandCreator commandCreator = new CommandCreator();
                    Command toServer = new Command(), fromServer;
                    String fromUser;
    
                    try {
                        
                        toServer.reset(Commands.REQ_GREET_ME);
                        out.writeObject(toServer);
                    
                        fromServer = (Command) in.readObject();
                        if (fromServer != null) System.out.println(fromServer.getValue(0).get());
    
                        toServer.reset(Commands.REQ_PLAYER_COUNT);
                        out.writeObject(toServer);
    
                        fromServer = (Command)in.readObject();
                        if (fromServer != null) System.out.println(fromServer.getValue(0).get());
    
                        //Here some more conversation based on user input...
                        
                        //Handle exceptions  and finally...
    I hope that the code is self-explanatory.

    PR.

    Try to play with ObjectOutputStream.reset (). My understanding is that the same object to write to the stream of data twice causes some kind of optimisation whereby the second time that only a reference to the first serialized object is written. Reset() can cause the object to rewrite it completely in its new State.

    PS: Creating objects is cheap these days. Don't feel that you were running a premature optimization? I'm not saying you do, just be wary of him! You can already see a negative effect of it: more fragile code and more complicate.

  • Access to the XML schemas from the connection manager?

    The connection manager for a connection opened in version 4 is no longer an 'XML Schémas' icon (Java and XML patterns seem to have been deleted between versions 3 and 4). Is there a definition that can return the XML schemas?

    Using lists yet... »

    XML schemas

    XML schemas are definitions of schema, written in XML, that describe the structure and various other semantics of XML instance documents. For conceptual and information on the use of XML schemas, see the Guide of Oracle XML DB Developer in the Oracle database documentation library.

    You can change an XML schema by right clicking in the connections Navigator XML schema name and selecting open from the menu. You can delete a selected schema by selecting the Drop Schema menu. » ...

    The XML node drawings missing in the connections Navigator is a known issue for the 4.0.1.  The 4.0.2 patch is a fix.

    Regarding the Java node, it seems to me in all versions 4.0.x.  Maybe your Preferences... > Database > Navigation filter turned it off?

    Kind regards
    Gary

    SQL development team

  • OSB does not validate the XML response automatically

    Hello

    I do a synchronization in OSB Service, which is a WSDL based Service of Proxy, which in turn calls a business service that points to a target URL.
    Request XML code is passed the URI of the Proxy endpoint and response is checked.

    The WSDL and XSD to the target system are different and contain more number of fields in their 'result' of the same schema element.

    It has been observed that although XSD and WSDL present in MW have less fields mentioned in their element of 'result', OSB receives all of the fields from the target and it as response.

    Is this a normal behavior?

    Thank you.

    Hello

    I did not understand your message clearly, but I think you have one of the two questions:

    The OSB Q1 Proxy Service) receives input without validating input, and a caller he calls the target system?
    Years > OSB server does not validate the incoming request until you put only the action post.

    Proxy OSB Q2 service) receives the response from the target service (you Business Service) is still the answer is not correct and then passes the response to the caller of the Proxy function?
    Years > same as above. It should be the responsibility of the service target to receive good application and send a clean answer. OSB will validate the response (from the target service) that if you put an action validate on the response received from the target service.

    I hope this clarifies your question?

    Thank you
    Sanjay

  • update the XML name by using sql

    Hello

    IAM using oracle 11g

    create table example (ch. clob);
    insert into a values (sample)
    ? XML version = "1.0"? (> < ABC > < company > < / ABC > < A employee > < name > < / name > < sex > M < / sex > < / employee > < employee > < name > B < / name > < sex > M < / sex > < / employee > < employee > < name > c < / name > < sex > F < / sex > < / employee > < / business > ');

    for example I want to update the 'ABC' to 'CDE' XML element

    ? XML version = "1.0"? (> < company > < ORDER > < / EBR > < A employee > < name > < / name > < sex > M < / sex > < / employee > < employee > < name > B < / name > < sex > M < / sex > < / employee > < employee > < name > c < / name > < sex > F < / sex > < / employee > < / company > ');


    How can I update this XML element name.

    I search the web, I found UPDATEXML it is used to change the value of XML. but I want to display xml name.

    Concerning
    Oracle user

    To start, if you want a pure XML solution, you should really use an XMLType column to store XML data in the first place.
    It allows several types of optimization takes place, according to the model of storage used.
    11 g, I highly recommend the use of binary XML storage (this is the default template from 11.2.0.2).

    IAM using oracle 11g

    What version exactly?

    On 11.2.0.3, you can use XQuery Update Facility:

    SQL> create table sample_data (doc xmltype);
    
    Table created
    
    SQL> insert into sample_data values (
      2  '
      3  
      4   
      5   AM
      6   BM
      7   cF
      8  ');
    
    1 row inserted
    
    SQL> commit;
    
    Commit complete
    
    SQL> set long 500
    SQL> select xmlserialize(document
      2           xmlquery(
      3            'copy $d := /Company
      4             modify rename node $d/ABC as "CDE"
      5             return $d'
      6            passing t.doc
      7            returning content
      8           )
      9           as clob indent
     10         )
     11  from sample_data t
     12  ;
    
    XMLSERIALIZE(DOCUMENTXMLQUERY(
    --------------------------------------------------------------------------------
    
      
      
        A
        M
      
      
        B
        M
      
      
        c
        F
      
    
     
    

    Other solutions of "XML" involve recursive or as mentioned XQuery, XSLT functions:

    SQL> SELECT XMLSerialize(DOCUMENT
      2    XMLTransform(
      3      t.doc
      4    , xmltype('
      5       
      6        
      7          
      8            
      9          
     10        
     11        
     12          
     13            
     14          
     15        
     16      ')
     17    )
     18    AS CLOB INDENT
     19  )
     20  FROM sample_data t
     21  ;
    
    XMLSERIALIZE(DOCUMENTXMLTRANSF
    --------------------------------------------------------------------------------
    
    
      
      
        A
        M
      
      
        B
        M
      
      
        c
        F
      
    
     
    
  • Download the file and get the XML response

    Hello
    When you download a file by using the method of the FileReference download, is there a way to retrieve information from the server other than the event "full." I need more information other than complete without HTTP error.

    For example, I download a zip file, do some processing on the zip file (check some information in the zip file), then I want to send some XML to the applicant actionscript... as Manager 'result' of HTTPService. Is this possible?

    : server script name:
    get Filedata (zip file) of the mission
    write Filedata to disk
    do things to zip the contents of the file
    spit XML (the XML would be consumed by actionscript)

    I was not able to find a way to do it using FileReference.

    Well, I'm a fool the answer was there in the docs...

    The FileReference object will be sending an uploadCompleteData event you can listen, and when it fires use the property data to extract the server response

    ...
    _fileRef.addEventListener (DataEvent.UPLOAD_COMPLETE_DATA, onUploadCompleteData);

    var mUploadURLRequest:URLRequest = new URLRequest (_uploadURL);

    _fileRef.upload (mUploadURLRequest);

    private void onUploadCompleteData (e: DataEvent): void
    {
    var data: Object = e.data;
    trace (ObjectUtil.toString (data));
    }

  • [CS5 - JS] Definition of the XML attributes from variables...

    Hello

    I'm building a XML variable to store the information needed to run my script.

    The XML structure is quite simple:

    var = new XML document ("< document > < pages > < page / > < / pages > < / document >");

    Every 'page' nodes are added using a simple statement.

    If I need to add an attribute to a node of 'page' I usually use this method:

    document.pages.page.@height= 210;

    What happens if I need to add an attribute without knowing its name (because it is stored in a variable)?

    Y at - it something like that? :

    document.pages.page.setAttribute (Name, 210);

    Have no idea how to handle this...

    Try this:

    document.pages.page['@'+var_name] = 210;

    @+

    Marc

  • Can we use &amp; in the commented code from PL/SQL?

    I used & in the commented block of PL/SQL when I compile it Toad, it was compiled, but it had not when I compile SQL * why?


    SQL > declare
    2 v_number number;
    3. start
    4 / * this called abc and xyz procedure * /.
    5 zero;
    6 end;
    6 N
    Enter the value for xyz:

    in SQL * more type:

    SQL> set define off
    

    to stop prompting substitution variables.

  • Bind the drop down list to XML response from the web service

    In Designer ES2, I'm trying to populate a drop-down list with the data returned by a web service, but can't seem to get the link right.

    I created a web service using Workbench, which returns the following XML data (shown here in a text field for test purposes):

    image1.PNG

    However, when I bind this to the DataDropdownList control, LiveCycle seems to be putting the entire XML document in the drop-down list.

    Liaison:

    image2.PNG

    (Full text of the link is connectionData.groupLeaderWebService.Body.invokeResponse.xmlData.document.)

    Result:

    image3.PNG

    Therefore, a connection is made and the web service returns data, but it is not bound correctly as items in the list.

    I need the drop-down list to display the individual names returned by the web service.  Finally, it probably will be expanded to include the name and identification number (text and value, respectively).

    Can you see where I am going wrong with this?  Any help would be appreciated.

    Thank you!

    Toby

    Oops. Good fishing. This should be pls.loadXML (form1.page1.footer.lots.rawValue, 0, 1);

  • Limit the rows returned from a sql prompt of dashboard

    Hello

    I use the following sql in the dash prompt to generate a list of values:
    SELECT LEFT (MONTHNAME ("begins and ends in days". (("" Start date "), 3) | » -'|| RIGHT (CAST (YEAR ("begins and ends in days". ((("" Start date ") AS VARCHAR (4)), 2) FROM the"metric"where"begins and ends in days. "" Start date "< = TIMESTAMPADD(SQL_TSI_MONTH, 1,current_date) ORDER BY 'Start and End Days '. "' Start date ' DESC
    which gives me an output like MAY-13,APR-13,MAR-13,FEB-13,JAN-13,DEC-12...;

    Is there a way to limit the release until FEB - 13...

    Thank you
    Sunny

    Use this
    where ' start and end days '. " Start date.<=TIMESTAMPADD(SQL_TSI_MONTH,>
    and "start and end days '." Start date "> = TIMESTAMPADD (SQL_TSI_MONTH,-2, current_date)"

    Check if help

  • Read the XML response with several root elements

    Hello


    I am trying to reach the scenario below but unable to do so. Please help urgently.

    I get a response of service that has several roots elements.these root items may change during execution of... I need to read items different roots and extract data from its subelements.

    Kind regards...

    In the hope of an answer...

    I guess over time, the service returns just 1 rootnode, but this rootnode property can change

    You can use a switch after the invoke

    If $response/myroot1
    assign $ myroot/response to myroot1_var

    If $response/myroot2
    assign $ myroot/response to myroot2_var

    etc.

    in order to check what is in the node root before you assign it to your temp variable
    or if you have logic that is specific based on this root node, you can simply implement all these branches in the switch and run a logic there, based on the selected rootnode property

    several implementations are possible

  • How to make httpconnection and get the xml response using httpconnection in post method.

    Hello

    I am new to the blackberry web work,

    I want to make httpconnection using the post method and also pass a parameter related to my url.

    This function returns xml data.

    How can I perform this task.

    Please help me if anyone has a solution...

    I have soved that problem myself.

  • The response from the query web service

    Hello


    I would like to apply for assistance in creating an appropriate query to process the response from the web service.

    This is the outdated response from the web service and my unsuccessful attempt to treat.


    PROCEDURE PRIMER_4B AS
    XML_WS XMLTYPE.
    CLOB DONNEES_XML
    ': = ' < s: Envelope xmlns:S = 'http://schemas.xmlsoap.org/soap/envelope/' > '.
    < Body >
    "< ns2:getDataResponse xmlns:ns2 ="http://service.anyxxx.com/">."
    < return >
    < id > 124 / < ID >
    < name > Ana < / name >
    < / return >
    < / ns2:getDataResponse >
    < / Body >
    < / s: Envelope > ';

    CSR OF CURSOR IS
    SELECT C.
    FROM XMLTable)
    XMLNamespaces)
                 ' http://schemas.xmlsoap.org/SOAP/envelope/ ' LIKE 'SOAP'
    , by default ' http://service.anyxxx.com/
    )
    , ': soap envelope / soap: Body/getDataResponse/back '
    PASSAGE XML_WS
    path id varchar2 columns (20) "id."
    path of the varchar2 (30) name 'name '.
    ) C   ;
    rec_CSR CSR % ROWTYPE;

    BEGIN
    XML_WS: = xmltype (donnees_xml);
    Open the CSR;
    LOOP
    EXTRACT THE CSR IN REC_CSR;
    DBMS_OUTPUT. Put_line (' Output: ' |) REC_CSR.ID |'   '|| REC_CSR. (Name)
    When the exit CSR % notfound;
    end loop;
    DBMS_OUTPUT. Put_line('Total:'||) CSR % ROWCOUNT);
    close the CSR;
    END PRIMER_4B;

    The result is:
    Output:
    Total 0


    Thank you
    Kostadin

    Hello

    This part does not:

    default 'http://service.anyxxx.com/'.

    If you declare this uri as the default namespace uri, then 'return', 'id', 'name' nodes are supposed to be in this namespace, which is not correct, because they are in any workspace names.

    Solution: give a specific prefix of the namespace above and reference it accordingly in the XQuery expression:

    C. SELECT

    FROM XMLTable)

    XMLNamespaces)

    "http://schemas.xmlsoap.org/soap/envelope/" AS "SOAP."

    , 'http://service.anyxxx.com/' as 'ns2.

    )

    , ': soap envelope / soap: Body / ns2:getDataResponse / back '

    PASSAGE XML_WS

    Path id varchar2 COLUMNS (20) "id".

    , path of the varchar2 (30) name 'name '.

    ) c ;

Maybe you are looking for