Doc problem analysis of XML with XPath

I'm trying to parse the XML in an RSS feed for information. I'm able to do perfectly for 1 of the RSS links, however, with the other, I can't seem to get the information. Here is the link the code works now for:

http://www.SimplyHired.com/a/job-feed/RSS/sq-Atlanta%2c+GA/o-35/FFT-Cook



And here's the RSS link I am trying to adapt my code to use for:

http://Auburn.craigslist.org/FBH/index.RSS



And here is my pl/sql code:
LOOP
  utl_http.set_proxy(apex_application.g_proxy_server, NULL);
  l_http_req := utl_http.begin_request(i.LINK);
  l_http_resp := utl_http.get_response(l_http_req);
  dbms_lob.createtemporary( l_clob, FALSE );
  dbms_lob.open( l_clob, dbms_lob.lob_readwrite );
  begin
    loop
      utl_http.read_text(l_http_resp, l_buffer);
      dbms_lob.writeappend( l_clob, length(l_buffer), l_buffer );
    end loop;
    exception
     when others then
      if sqlcode <> -29266 then
       raise;
      end if;
  end;
  --
  utl_http.end_response(l_http_resp);

  apex_collection.add_member(
    p_collection_name => 'RSS_RESPONSE',
    p_clob001         => l_clob );

  apex_collection.add_member(
    p_collection_name => 'RSS_RESPONSE_TOTAL',
    p_clob001         => l_clob );


  -- Extracting values from the collection and storing
  -- the results in a table.
  FOR x in (
  SELECT extractValue(value(t),'/*/title') Title,
         extractValue(value(t),'/*/link') Link,
         extractValue(value(t),'/*/pubDate') PublishDate,
         extractValue(value(t),'/*/description') Description
  FROM apex_collections c,
       table(xmlsequence(extract(xmltype.createxml(c.clob001),'/rss/channel/item'))) t
  WHERE c.collection_name = 'RSS_RESPONSE'
  )
  LOOP

    SELECT count(1) into counter_var
    FROM JOB_RSS_FEEDS_CONTENT
    WHERE LINK = x.Link;
     
    if (counter_var > 0) then
      counter_var := 0;
    else
    
      SELECT JOB_RSS_FEEDS_SEQ.NEXTVAL INTO link_counter FROM DUAL;
 
      INSERT INTO JOB_RSS_FEEDS_CONTENT(ID, TITLE, LINK, DESCRIPTION, JOBTYPE, PUB_DATE, METROAREA, STATE, ZIPCODE, LINK_SOURCE)
      VALUES (link_counter, x.Title, x.Link, x.Description, i.POSITION, to_date(substr(UPPER(x.PublishDate), 1, length(x.PublishDate)-3), 'DY, DD MON YYYY HH24:MI:SS'), initcap(i.METROAREA), upper(i.STATE), i.ZIPCODE, i.LINK_SOURCE);

    end if;
  END LOOP;


  --resetting our collection to be used for the next rss feed
  apex_collection.create_or_truncate_collection('RSS_RESPONSE');
  l_clob := NULL;
  l_buffer := NULL;
 
 
  --
  -- If no records left to process or if we've cycled through
  -- links_to_read_in iterations, then exit loop.
  --
  if ((tmp_count = 0) or (loop_count >= (links_to_read_in-1))) then
    exit;
  end if;


  -- incrementing our iteration counter
  loop_count := loop_count + 1;

END LOOP;  -- for SELECT LINK, METROAREA, STATE, ZIPCODE loop
I thought that the problem is with the line:
table(xmlsequence(extract(xmltype.createxml(c.clob001),'/rss/channel/item'))) t 
I tried to change to:
table(xmlsequence(extract(xmltype.createxml(c.clob001),'/'))) t 
And then:
table(xmlsequence(extract(xmltype.createxml(c.clob001),'/rdf/item'))) t
But those who do not work either. Can't think of what it could be. Any thoughts?

Published by: taneal on October 27, 2008 12:05

In order to rule out any problems with the table of the apex, you might want to check the single clob.

Instead of

SELECT extractValue(value(t),'/*/title') Title,
           extractValue(value(t),'/*/link') Link,
           extractValue(value(t),'/*/description') Description
    FROM apex_collections c,
          table(xmlsequence(extract(xmltype.createxml(c.clob001),
             '/rdf:RDF/item',
             'xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"'))) t
WHERE c.collection_name = 'RSS_RESPONSE'

test this

SELECT extractValue(value(t),'/*/title') Title,
           extractValue(value(t),'/*/link') Link,
           extractValue(value(t),'/*/description') Description
    FROM table(xmlsequence(extract(xmltype.createxml(l_clob),
             '/rdf:RDF/item',
             'xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"'))) t

Note that I've changed from c.clob001 to l_clob.

or even

SELECT extractValue(t.column_value,'item/title') Title,
       extractValue(t.column_value,'item/link') Link,
       extractValue(t.column_value,'item/description') Description
    FROM table(xmlsequence(extract(xmltype.createxml(l_clob),
             '/rdf:RDF/item',
             'xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"'))) t

I also imagine that we should add the other namespaces too. My example has only a namespace inside.

Published by: Sven w. on October 29, 2008 17:38

Tags: Database

Similar Questions

  • Analysis of xml with parserv2 hard

    Hello, since a servlet on OAS 10.1.2.0.2, I'm trying to parse some xml but I get only a partial success. First problem I see is that it has 7 children of my node selected (LoanType) - there are two. Seven children are reported. But there are 7 LoanType nodes (brothers and sisters). The second problem is that I can not get the value of a node; just the name. getNodeValue() always returns null. But getNodeName() works very well. Anyone know why?

    PS, there is no DTD or schema. It was supposed to be a simple proof of concept. 8 -)

    my xml file:
    ------------
    < LoanDecision >
    < LoanType >
    Costs of < ShortName > < / ShortName >
    Costs of < LongName > < / LongName >
    < / LoanType >

    .. shown .not are six knots of LoanType more with the same format as the above...

    < / LoanDecision >



    my code snippet:
    -------------------
    URL url = new URL ("xmlUrl");
    DOMParser parser = new DOMParser();
    parser. Parse (URL);
    Doc document = parser.getDocument ();
    NodeList mainNodeList = doc.getElementsByTagName("LoanType");

    for (int mainNodeIt = 0; mainNodeIt < mainNodeList.getLength (); mainNodeIt ++) {}
    E node = mainNodeList.item (mainNodeIt);
    NodeList children = e.getChildNodes ();
    out.println ("primary node:" + e.getNodeName () + "with" + children.getLength () + "of the children.) < br >");

    for (int childIt = 0; childIt < children.getLength (); childIt ++) {}
    Node ee = children.item (childIt);
    String name = ee.getNodeName ();
    If (name.equals ("ShortName") | name.equals ("LongName")) {}
    out.println (name + ":" + ee.getNodeValue () + "< br >");
    }
    }
    }



    results:
    --------
    Main node: LoanType with 7 children.
    ShortName:null
    LongName:null
    Main node: LoanType with 7 children.
    ShortName:null
    LongName:null
    Main node: LoanType with 7 children.
    ShortName:null
    LongName:null
    Main node: LoanType with 7 children.
    ShortName:null
    LongName:null
    Main node: LoanType with 7 children.
    ShortName:null
    LongName:null
    Main node: LoanType with 7 children.
    ShortName:null
    LongName:null
    Main node: LoanType with 7 children.
    ShortName:null
    LongName:null

    getNodeValue() always returns null.
    Replace getNodeValue() by getFirstChild () .getNodeValue)

  • Analysis of XML with Namespace

    Hello

    Can someone help me with the following: -.
    I have an XMLType in pl/sql as follows:

    <? XML version = "1.0" encoding = "utf-8"? >
    < rapdrpProcessCIN:GetCINRes xmlns:rapdrpProcessCIN = "http://rapdrp.com/processcin/transactional/model/1.0/" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http://rapdrp.com/processcin/transactional/model/1.0/."
    xmlns:N1 = "http://rapdrp.com/common/bodcomponents/transactional/model/1.0/".
    xmlns:N2 = "http://rapdrp.com/gis/cin/business/model/1.0/" >
    < rapdrpProcessCIN:ApplicationArea >
    < N1:Sender >
    < N1:Id > PRT01 < / N1:Id >
    < / N1:Sender >
    < N1:Receiver >
    < N1:CompanyName > MGVCL < / N1:CompanyName >
    string of < N1:CompanyId > < / N1:CompanyId >
    < / N1:Receiver >
    < N1:Reference >
    < N1:BODCreationDateTime > 1697 - 02-01 T 00: 00:00Z < / N1:BODCreationDateTime >
    < N1:BusinessProcessId > BP014 < / N1:BusinessProcessId >
    string of < N1:MessageId > < / N1:MessageId >
    string of < N1:TransactionId > < / N1:TransactionId >
    string of < N1:Username > < / N1:Username >
    string of < N1:Token > < / N1:Token >
    < / N1:Reference >
    < / rapdrpProcessCIN:ApplicationArea >
    < rapdrpProcessCIN:DataArea >
    < rapdrpProcessCIN:CIN >
    string of < N2:CIN > < / N2:CIN >
    < / rapdrpProcessCIN:CIN >
    string of < rapdrpProcessCIN:ConsumerNumber > < / rapdrpProcessCIN:ConsumerNumber >
    string of < rapdrpProcessCIN:SRNumber > < / rapdrpProcessCIN:SRNumber >
    < / rapdrpProcessCIN:DataArea >
    < / rapdrpProcessCIN:GetCINRes > note the tag < message > xmlns attribute is "" which is unusual, but not something I can't change.

    I want to retrieve the text string of the BusinessProcessId tag. I tried the following:

    DECLARE
    v_result varchar2 (32765);
    XMLType v_xml;
    BEGIN
    v_xml: = XMLType ('... over XML...');
    v_result: = xmltype.extract (v_xml, ' / rapdrpProcessCIN:GetCINRes / rapdrpProcessCIN:ApplicationArea / BusinessProcessId/reference/text () "," xmlns:rapdrpProcessCIN = "http://rapdrp.com/processcin/transactional/model/1.0/" ""). getStringVal();

    dbms_output.put_line ('v_result :'|| v_result);
    END;

    ... and I get the following result:

    ORA-30625: shipping method on the argument NULL SELF is not allowed
    ORA-06512: at line 6

    What I am doing wrong?
    Any help appreciated.

    Kind regards
    Himani

    Hello

    /PurchaseOrder/ShippingInstructions/name/text()
    

    Given that the 'name' element is empty, XPath leads to a NULL XMLType instance and so the error ORA-30625.

    If you want to retrieve a single value (that is, an attribute or a text node), you must always use the extractValue() or function XMLQuery() function in 11g (see my previous post).
    So in your example:

    ...
    
    --v_result := xmltype.extract(v_xml,'/PurchaseOrder/ShippingInstructions/name/text()','xmlns="http://rapdrp.com/processcin/transactional/model/1.0/"').getStringVal();
    
    select extractValue( v_xml,
                         '/PurchaseOrder/ShippingInstructions/name',
                         'xmlns="http://rapdrp.com/processcin/transactional/model/1.0/"' )
    into v_result
    from dual;
    
    dbms_output.put_line('v_result:'||v_result);
    
    ...
    
  • Analysis of XML with SAX parser

    
    
    
      
         
        
                
        
                
            
        
        
                
        
                
            
    
    
        
                
    
        
                
          
    
    
        
                
    
        
                        
    
            
                
    
        
                
        
                
    
        
                
        
    
    
    

    It comes to my XML. I am able to analyze using the DOM parser, bt I m new analysis SAX. Can someone help me to analyze it using SAX parser

    There is a snippet of Code to call the HTTP Xml & only to the analyzed using Sax parser.

    SAXParserImpl saxparser = new SAXParserImpl();
    ListParser receivedListHandler=new  ListParser();
    static DataInputStream din = null;
    public static String response;
    
        HttpConnection hc = null;
            OutputStream os;
               try
               {
                   final String url =""+ InitClass.getConnectionString()+";ConnectionTimeout=25000";
    
                   hc = (HttpConnection)Connector.open(url);
    
                   os = hc.openOutputStream();
                   os.write(postDataBytes);
    
                   if (hc.getResponseCode() == 200)
                        din = hc.openDataInputStream();
                    else
                        response = "" + hc.getResponseCode();
                    saxparser.parse(din, receivedListHandler);
               }
               catch (Exception e)
               {
    
               }
               finally
               {
                  try
                  {
                      if(din!=null)
                          din.close();
                      din = null;
                      if(hc!=null)
                          hc.close();
                      hc = null;
                  }
                  catch (Exception e) {   }
               }
    

    class Analyzer

    public class ListParser extends DefaultHandler
    {
    private String Key="";
    private  Hashtable ht=new Hashtable();
    vector vec = new Vector();
    public ListParser()
    {
    
    }
    /**
    * Gets called, whenever a Xml is start .
    */
    public void startDocument() throws SAXException
    {
    
    }
    /**
    * Gets called, whenever a Xml is End .
    */
    public void endDocument() throws SAXException
    { 
    
    }
    /**
    * Gets called, whenever a new tag is found.
    */
    public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException
    {
        if(name.equals(""))
        {
            ht = null;
            ht = new Hashtable();
        }
        else if(name.equals(""))
        {
    
        }
        Key=name;
    }
    
    /**
    * Gets called, whenever a closed tag is found.
    */
    public void endElement(String uri, String localName, String name) throws SAXException
    {
        if(name.equals(""))
        {
            vec.addElement(ht);
        }
    }
    public void characters(char[] ch, int start, int length) throws SAXException
    {
        String element=new String(ch, start, length);
        ht.put(Key, element);
    }
    }
    

    It will analyze your XML file and you will get data of vector vec in hash tables by XML tag.

  • Analysis of xml with QT

    Hello

    Is there a way to parse the XML in a QString? All of the examples on the web shows how to parse the XML for the file, but none of them shows how to parse XML from a QString. I have a server for my app to connect to via TCP/IP, and the server then sends the XML to the client (app) to be scanned, it will be a waste of resources prior to writing the XML to a file.

    I have the base sax parser and my implementation looks like this

    XMLHandler * m_handler;

    QXmlInputSource * source = new QXmlInputSource (new QFile("asset:///responseMessage.xml"));)

    QXmlSimpleReader reader;
    reader.setContentHandler (m_handler);

    Reader.Parse (source);

    How can I change this line

    QXmlInputSource * source = new QXmlInputSource (new QFile("asset:///responseMessage.xml"));)

    to use a string input, and not a file? I know that QXmlInputSource class does not support a string of implementation is if there is another approach in the API that I can use?

    Thank you for all the advice!

    I found the solution. I changed my class instead to use a QXmlStreamReader. It can take values QByteArray in its constructor so I just called the QString toAscii method to convert the string received from my server to a QByteArray and passed to the QXmlStreamReader. This implementation does not require major changes to my manager so I think it works best for my situation. Thanks for all the help guys.

  • problem in parsing xml with validation

    Hello

    I use webservice and xml parsing allows to get data from it, he worked successfully when I put data valid that webservice are made up.

    But now, I want that if I put some data not valid in URLs for validation purposes.

    When I put the wrong data, it shows me exception. So, how I can handle it when the user put data not valid.

    Please help me .it's urgent.

    Thanks for the reply,

    I solved it myself.

  • Problem when inserting xml with a dtd inline data.

    Hi all
    I have an xml that has been posted wrt a DTD.
    The dtd is included in the first line of the xml file.
    What is the tyrying to insert the xml code in the database, that the exception has occurred
    "ORA-31001: handle or path invalid resource name ' / Sample.dtd ' ORA-06512: at"SYS." XMLTYPE", line 254 ORA-06512: at line 1"
    type of the column used is XMLType.
    Using oracle 10.2.
    Table - create table xmltable (versionNumber number, xmltype instance);
    When we do the insertion as
    insert into values xmltable (1, xmltype ("<?")) XML version = "1.0" encoding ="UTF - 8"? >
    <! DOCTYPE SYSTEM "Sample.dtd" >
    < NAME of CONFIGURATION = "config1" >
    ((' < / CONFIGURATION > "));
    Must be inserted normally, as I'm not validate r w t a pattern recorded.
    Please, help me in this issue.

    Edited by: jagdish1206 may 20, 2010 04:39

    jagdish1206 wrote:
    Is it possible to off Mode validation, so that it simply records the xml code.

    Have you ever tried:

    alter session set events ='31156 trace name context forever, level 2';
    
  • Problem with parsing XML with html as part of the node content

    Hi all

    I am facing problem with XML parsin when the node has a HTML content, if the node does not have any html content then it works fine. Similar analysis logic works for Java Standard, but not for the Blackberry API. I have an obligation to remove not HTML content prior to analysis. As that would display in the browser.

                              String xml="" +
                    "<p> Dummy content </p> " +
                    "" +
                    "";
                              DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder dBuilder;
                Document doc;
                bis = new ByteArrayInputStream(xml.getBytes("UTF-8")); 
    
                dBuilder = dbFactory.newDocumentBuilder();
    
                doc = dBuilder.parse(bis);
                doc.getDocumentElement().normalize();
    
                NodeList nList = doc.getElementsByTagName("disclaimer");
    
                Element activeTagElmnt = (Element) nList.item(0);
                NodeList activeTag = activeTagElmnt.getChildNodes(); 
    
                tagValue=((Node) activeTag.item(0)).getNodeValue();
                              System.out.println(tagValue); //This prints "<" with HTML content. If i remove HTML then "Dummy Content" is printed
    

    If I need to remove html content, then I would need to reformat the content according to the HTML as the newline to a linebreak.

    Any suggestions would be helpful.

    Thank you

    Sandeep

    I feel xml parser was mature enough to handle these characters if sills, you get the error explore CDATA. It might help you.

  • Hi I have a problem of xml with xsd validation and insert into the table...

    I use this function to validate the XML with xsd, but it gives-31000 error related to xdb

    and I also try to recover data from the xml file, but it is fetching nullability of him.

    while I was trying to recover data after removing the tablenamespace, url and other additional field or can tell

    from a simple xml file than it is to get him.

    Please help me with this!

    FUNCTION to CREATE or REPLACE ALI$ XML_VALID (P_xml IN xmltype
    P_xsd IN xmltype)
    RETURN NUMBER
    is


    l_status NUMBER;
    l_xml xmltype.
    l_xsd XMLTYPE.
    l_v_schemaURL VARCHAR2 (256): = "NewBusinessApplication.xsd";
    schema_doesnt_exist exception;
    pragma exception_init (schema_doesnt_exist,-31000);

    BEGIN
    l_xsd: = p_xsd;
    Start
    DBMS_XMLSCHEMA.deleteSchema (l_v_schemaURL, dbms_xmlSchema.DELETE_CASCADE_FORCE);
    exception
    When schema_doesnt_exist then
    null;
    end;

    DBMS_XMLSCHEMA. REGISTERSCHEMA)

    schemaurl = > l_v_schemaURL

    , schemadoc = > l_xsd

    local = > TRUE

    , genTypes = > FALSE

    , genbean = > FALSE

    , genTables = > FALSE

    );
    l_xml: = p_xml;

    If l_xml.isSchemaValid () = 1 then

    dbms_output.put_line ("' scheme is valid");
    l_status: = 1;
    RETURN l_status;
    on the other
    l_xml.schemaValidate ();
    l_status: = 0;
    RETURN l_status;
    end if;
    END;

    -call to above function

    DECLARE

    l_xml xmltype: = xmltype (' <? xml version = "1.0" encoding = "UTF - 8"? >)

    "" < NewBusinessApplication xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"

    "" xsi: schemaLocation = "http://www.example.org NewBusinessApplication.xsd.

    xmlns ="http://www.example.org" > ".

    < TransactionHeader >

    < TR_REF_NO > 000009812681 < / TR_REF_NO >

    < EFF_DT > 20140703094140.572 [-4:US / Eastern] < / EFF_DT >

    < SRC_SYS_CD dmnSRC_SYSTEM = "TSS" > Support of TV system < / SRC_SYS_CD >

    < / TransactionHeader >

    < ApplicationRq >

    < ApplInfo >

    < APPLNO > A00018L < / APPLNO >

    < MED_NONMED dmnMED_NONMED = "M" > medical < / MED_NONMED >

    < APPL_DT > 20140714 < / APPL_DT >

    < EFF_DT > 20140714 < / EFF_DT >

    < APPL_RECV_DT > 20140714 < / APPL_RECV_DT >

    < / ApplInfo >

    < AgentInfo >

    <! – repeat the nodes below for more than one agent - >

    <>Agent

    < AGT_CD > AGN0000001 < / AGT_CD >

    James < FIRSTNAME > < / NAME >

    < NAME > Whorphin < / LASTNAME >

    BKK1010090009 < AGT-LICNO > < / AGT-LICNO >

    the Warriors < TEAM > < / TEAM >

    Suriya Thapa < TEAMLEADER > < / TEAMLEADER >

    BKK909988999 < TEAMLEADER-LICNO > < / TEAMLEADER LICNO >

    < / agent >

    < / AgentInfo >

    < InsuredInfo >

    < dmnPERS_NAMEPREFIX PREFIX-TH = "XX" > Dr. < / PREFIX-TH >

    XXXXXXX < FIRSTNAME-TH > < / FIRSTNAME-TH >

    XXXXXX < MIDNAME-TH > < / MIDNAME-TH >

    XXXXXX < LASTNAME-TH > < / LASTNAME-TH >

    XXXXXX < FORMERNAME > < / FORMERNAME >

    < PREFIX-dmnPERS_NAMEPREFIX-EN = "XX" > Dr. < / PREFIX-EN >

    YYYYYY < FIRSTNAME-EN > < / FIRSTNAME-EN >

    YYYYYY < MIDNAME-EN > < / MIDNAME-FR >

    YYYYYY < LASTNAME-EN > < / LASTNAME-EN >

    < BIRTH_DT > 19800101 < / BIRTH_DT >

    < 33 YEARS > < / AGE >

    < dmnPERNSEXCD = "XX" SEX > male < / TYPE >

    < DmnPERC_MAR_STAT_CD MARITAL_STATUS = "XX" > single < / MARITAL_STATUS >

    < dmnRACE = "XX" RACE > ZZZ < / RACE >

    < dmnRELIGION RELIGION = "H" > HINDU < / RELIGION >

    < dmnNATIONALITY NATIONALITY = an' TH' > THAI < / NATIONALITY >

    < dmnIDTYPE ID-TYPE = "TI" > Thai National ID < / ID-TYPE >

    > ID < AJMPK0001J < / ID >

    < ID-XPIR_DT > 20200101 < / ID-XPIR_DT >

    < dmnOCCUP_CD OCCUPATION = "XX" / >

    < OCCUP_CLASS dmnOCCUP_CLASS_CD = 'XX' / >

    < ANNUAL_INCOME > 100000 < / ANNUAL_INCOME >

    < HEIGHT > 175 < / HEIGHT >

    < WEIGHT > 80 < / WEIGHT >

    < / InsuredInfo >

    < ProposerInfo >

    < dmnPERS_NAMEPREFIX PREFIX-TH = "XX" > Dr. < / PREFIX-TH >

    XXXXXXX < FIRSTNAME-TH > < / FIRSTNAME-TH >

    XXXXXX < MIDNAME-TH > < / MIDNAME-TH >

    XXXXXX < LASTNAME-TH > < / LASTNAME-TH >

    XXXXXX < FORMERNAME > < / FORMERNAME >

    < PREFIX-dmnPERS_NAMEPREFIX-EN = "XX" > Dr. < / PREFIX-EN >

    YYYYYY < FIRSTNAME-EN > < / FIRSTNAME-EN >

    YYYYYY < MIDNAME-EN > < / MIDNAME-FR >

    YYYYYY < LASTNAME-EN > < / LASTNAME-EN >

    < BIRTH_DT > 19800101 < / BIRTH_DT >

    < 33 YEARS > < / AGE >

    < dmnPERNSEXCD = "XX" SEX > male < / TYPE >

    < DmnPERC_MAR_STAT_CD MARITAL_STATUS = "XX" > single < / MARITAL_STATUS >

    < dmnRACE = "XX" RACE > ZZZ < / RACE >

    < dmnRELIGION RELIGION = "H" > HINDU < / RELIGION >

    < dmnNATIONALITY NATIONALITY = an' TH' > THAI < / NATIONALITY >

    < dmnIDTYPE ID_TYPE = "TI" > Thai National ID < / ID_TYPE >

    AJMPK0001J < ID_NUMBER > < / ID_NUMBER >

    < ID_XPIR_DT > 20200101 < / ID_XPIR_DT >

    < dmnOCCUP_CD OCCUPATION = "XX" / >

    < OCCUP_CLASS dmnOCCUP_CLASS_CD = 'XX' / >

    < ANNUAL_INCOME > 100000 < / ANNUAL_INCOME >

    < / ProposerInfo >

    < ContactInfo >

    < AddressInfo >

    <! – repeat the nodes below for each address type - >

    < address >

    < dmnADDR_ADDRTYPE ADDRTYPE = "01" > home < / ADDRTYPE >

    < PRIMARY_CONTACT > 0 < / PRIMARY_CONTACT >

    < / address >

    < address >

    < dmnADDR_ADDRTYPE ADDRTYPE "02" = > Office < / ADDRTYPE >

    < PRIMARY_CONTACT > 1 < / PRIMARY_CONTACT >

    < / address >

    < / AddressInfo >

    < PhoneInfo >

    <! – repeat the nodes below for each type of phone - >

    < Phone >

    < dmnADRP_PHONETYPE PHONETYPE "01" = > Mobile < / PHONETYPE >

    < PHONENUM > 9887666789 < / PHONENUM >

    < PRIMARY_CONTACT > 1 < / PRIMARY_CONTACT >

    < / Phone >

    < Phone >

    < dmnADRP_PHONETYPE PHONETYPE "02" = > home < / PHONETYPE >

    < PHONENUM > 9887666789 < / PHONENUM >

    < PRIMARY_CONTACT > 0 < / PRIMARY_CONTACT >

    < / Phone >

    < / PhoneInfo >

    < EmailInfo >

    <! – repeat the nodes below for each type of email - >

    < email >

    < EMAILTYPE dmnADRO_EMAILTYPE = "01" > e-mail1 < / EMAILTYPE >

    < EMAILDATA > [email protected] < / EMAILDATA >

    < PRIMARY_CONTACT > 0 < / PRIMARY_CONTACT >

    < / email >

    < email >

    < EMAILTYPE dmnADRO_EMAILTYPE "02" = > Email2 < / EMAILTYPE >

    < EMAILDATA > [email protected] < / EMAILDATA >

    < PRIMARY_CONTACT > 1 < / PRIMARY_CONTACT >

    < / email >

    < / EmailInfo >

    < / ContactInfo >

    < PolicyInfo >

    STG102 < BASE-PLAN_CD > < / BASE-PLAN_CD >

    < BASE-PLAN_NM > Smart term 10 gold < / BASE-PLAN_NM >

    < MODEOFPAYMENT dmnZZFREQUENCY = "M" > monthly < / MODEOFPAYMENT >

    < BASE - ITS > 100000.00 < / BASE - SA >

    < BASE-PREMIUM > 12000.00 < / BASE-PREMIUM >

    < BASE-MODALPREMIUM > 1000.00 < / BASE-MODALPREMIUM >

    < AYFP > 13200.00 < / AYFP >

    < RiderInfo >

    < rider >

    RIDER < CODE > ME < / RIDER-CODE >

    Medical costs < RIDER-NAME > < / RIDER-NAME >

    < RIDER - HIS 20000.00 > < / RIDER - SA >

    < RIDER-PREMIUM > 600.00 < / RIDER-PREMIUM >

    < RIDER-MODALPREMIUM > 50.00 < / RIDER-MODALPREMIUM >

    < / rider >

    < rider >

    RIDER HAB < CODE > < / RIDER-CODE >

    < NAME-RIDER > Admission hospitalization < / RIDER-NAME >

    < RIDER - HIS 20000.00 > < / RIDER - SA >

    < RIDER-PREMIUM > 600.00 < / RIDER-PREMIUM >

    < RIDER-MODALPREMIUM > 50.00 < / RIDER-MODALPREMIUM >

    < / rider >

    < / RiderInfo >

    < / PolicyInfo >

    < PaymentInfo >

    < borde >

    < TMP_RECEIPT_NO > TEMP0001 < / TMP_RECEIPT_NO >

    < TOTAL_PYMT_AMT > 13200.00 < / TOTAL_PYMT_AMT >

    <! – repeat the nodes below for payment through several channels - >

    < payment >

    < dmnPAYRTYPE PAYER "01" = > secured < / PAYER >

    credit card < dmnPaymentType PYMT TYPE = "01" > < / PYMT-TYPE >

    < PYMT-AMT > 13200.00 < / PYMT-AMT >

    < PYMT-Channel >

    credit <>card

    Visa < dmnCardType CARD-TYPE = "01" > < / CARD-TYPE >

    < BADGE - N ° > 9890989098909877 < / CARD-NOT >

    < HOLDERNAME-CARD > RICKY WHORPHIN < / CARD-HOLDERNAME >

    < BANKNM-CARD > Standard Chartered Bank < / MAP-BANKNM >

    < MAP SHOWED > 08/14 < / CARD-SHOW >

    < MAP-AUTHCODE / >

    < CARD-AUTHDATE / >

    < / credit card >

    < / PYMT-Channel >

    < / payment >

    < payment >

    < dmnPAYRTYPE PAYER "01" = > secured < / PAYER >

    < dmnPaymentType PYMT-TYPE = '02' > account < / PYMT-TYPE >

    < PYMT-AMT > 13200.00 < / PYMT-AMT >

    < PYMT-Channel >

    < Bank >

    < BANK CODE / >

    < BANK BRANCH / >

    < BANK-ACCNO / >

    < BANK-ACCNAME / >

    < / Bank >

    < / PYMT-Channel >

    < / payment >

    < payment >

    < dmnPAYRTYPE PAYER "01" = > secured < / PAYER >

    < dmnPaymentType PYMT TYPE = "03" > check < / PYMT-TYPE >

    < PYMT-AMT > 13200.00 < / PYMT-AMT >

    < PYMT-Channel >

    < check >

    < CHQ - n / >

    < CHQ-DATE / >

    < CHQ-ISSUEBANK / >

    < / cheque >

    < / PYMT-Channel >

    < / payment >

    < / shell >

    < RenewalPayment >

    < dmnPAYRTYPE PAYER "01" = > secured < / PAYER >

    < DDCHANNEL dmnPaymentType "01" = > SDC < / DDCHANNEL >

    < DDCDetails >

    Visa < dmnCardType CARD-TYPE = "01" > < / CARD-TYPE >

    < BADGE - N ° > 9890989098909877 < / CARD-NOT >

    < HOLDERNAME-CARD > RICKY WHORPHIN < / CARD-HOLDERNAME >

    < BANKNM-CARD > Standard Chartered Bank < / MAP-BANKNM >

    < MAP SHOWED > 08/14 < / CARD-SHOW >

    < / DDCDetails >

    < DDADetails >

    < dmnBNK_TYP_CD BANK-ACCTYPE = "01" > save < / BANK-ACCTYPE >

    < BANK-ACCNO / >

    < BANK-ACCNAME / >

    < BANK BRANCH / >

    < / DDADetails >

    < / RenewalPayment >

    < / PaymentInfo >

    < BeneficiaryInfo >

    <!--repeat the nodes below for each beneficiary and the sum of the pct should be 100-->

    < recipient >

    Joint < dmnBENE_RELT_CD RELATIONSHIP = "01" > < / RELATIONSHIP >

    XXXX < FIRSTNAME > < / NAME >

    XXXXX < MIDNAME > < / MIDNAME >

    XXXX < NAME > < / LASTNAME >

    < PERCENT > 50 < / PERCENTAGE >

    < BIRTH_DT > 19800101 < / BIRTH_DT >

    < dmnPERNSEXCD SEX = "XX" > female < / TYPE >

    < NATLIDNO > TH000001 < / NATLIDNO >

    < / recipients >

    < recipient >

    < dmnBENE_RELT_CD RELATIONSHIP "02" = > child < / RELATIONSHIP >

    XXXX < FIRSTNAME > < / NAME >

    XXXXX < MIDNAME > < / MIDNAME >

    XXXX < NAME > < / LASTNAME >

    < PERCENT > 50 < / PERCENTAGE >

    < BIRTH_DT > 19800101 < / BIRTH_DT >

    < dmnPERNSEXCD = "XX" SEX > male < / TYPE >

    < NATLIDNO > TH000002 < / NATLIDNO >

    < / recipients >

    < / BeneficiaryInfo >

    < survey >

    < HealthDeclaration >

    < question >

    Q001 < QUESTION_ID > < / QUESTION_ID >

    < dmnZZYESNO_NUM RESPONSE = "N" > n < / ANSWER >

    < / question >

    < question >

    Q002 < QUESTION_ID > < / QUESTION_ID >

    < dmnZZYESNO_NUM RESPONSE = "N" > n < / ANSWER >

    < / question >

    < question >

    Q003 < QUESTION_ID > < / QUESTION_ID >

    < dmnZZYESNO_NUM RESPONSE = "N" > n < / ANSWER >

    < / question >

    < question >

    Q004 < QUESTION_ID > < / QUESTION_ID >

    < dmnZZYESNO_NUM RESPONSE = "N" > n < / ANSWER >

    < / question >

    < question >

    Q005 < QUESTION_ID > < / QUESTION_ID >

    < dmnZZYESNO_NUM RESPONSE = "N" > n < / ANSWER >

    < / question >

    < / HealthDeclaration >

    < / questionnaire >

    < / ApplicationRq >

    < ApplicationRs >

    <-reason for the rejection / >

    < / ApplicationRs >

    < / NewBusinessApplication >

    ');

    l_xsd xmltype: = xmltype (' <? xml version = "1.0" encoding = "windows-1252"? >)

    "< xsd: Schema container ="http://www.w3.org/2001/XMLSchema"xmlns ="http://www.example.org"

    targetNamespace ="http://www.example.org" elementFormDefault = "qualified" > "

    < xsd: element name = "NewBusinessApplication" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "TransactionHeader" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "TR_REF_NO" type = "xsd: Integer" / >

    < xsd: element name = "EFF_DT" type = "xsd: String" / >

    < xsd: element name = "SRC_SYS_CD" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnSRC_SYSTEM" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ApplicationRq" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "ApplInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "APPLNO" type = "xsd: String" / >

    < xsd: element name = "MED_NONMED" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnMED_NONMED" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "APPL_DT" type = "xsd: Integer" / >

    < xsd: element name = "EFF_DT" type = "xsd: Integer" / >

    < xsd: element name = "APPL_RECV_DT" type = "xsd: Integer" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "AgentInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "The Agent" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "AGT_CD" type = "xsd: String" / >

    < xsd: element name = "FIRSTNAME" type = "xsd: String" / >

    < xsd: element name = "NAME" type = "xsd: String" / >

    < xsd: element name = "AGT-LICNO" type = "xsd: String" / >

    < xsd: element name = "TEAM" type = "xsd: String" / >

    < xsd: element name = "TEAMLEADER" type = "xsd: String" / >

    < xsd: element name = "TEAMLEADER-LICNO" type = "xsd: String" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "InsuredInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = 'PREFIX-TH' >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERS_NAMEPREFIX" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NAME-TH" type = "xsd: String" / >

    < xsd: element name = "MIDNAME-TH" type = "xsd: String" / >

    < xsd: element name = "LASTNAME-TH" type = "xsd: String" / >

    < xsd: element name = "FORMERNAME" type = "xsd: String" / >

    < xsd: element name = "PREFIX-FR" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERS_NAMEPREFIX-EN" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NAME-IN" type = "xsd: String" / >

    < xsd: element name = "MIDNAME-EN" type = "xsd: String" / >

    < xsd: element name = "LASTNAME-IN" type = "xsd: String" / >

    < xsd: element name = "BIRTH_DT" type = "xsd: Integer" / >

    < xsd: element name = "ÂGE" type = "xsd: Integer" / >

    < xsd: element name = "GENDER" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERNSEXCD" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "MARITAL_STATUS" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERC_MAR_STAT_CD" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "RACE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnRACE" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "RELIGION" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnRELIGION" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NATIONALITY" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnNATIONALITY" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ID-TYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnIDTYPE" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ID" type = "xsd: String" / >

    < xsd: element name = "ID-XPIR_DT" type = "xsd: Integer" / >

    < xsd: element name = "OCCUPATION" >

    < xsd: complexType >

    < xsd: attribute name = "dmnOCCUP_CD" type = "xsd: String" / >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "OCCUP_CLASS" >

    < xsd: complexType >

    < xsd: attribute name = "dmnOCCUP_CLASS_CD" type = "xsd: String" / >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ANNUAL_INCOME" type = "xsd: Integer" / >

    < xsd: element name = "HEIGHT" type = "xsd: Integer" / >

    < xsd: element name = "WEIGHT" type = "xsd: Integer" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ProposerInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = 'PREFIX-TH' >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERS_NAMEPREFIX" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NAME-TH" type = "xsd: String" / >

    < xsd: element name = "MIDNAME-TH" type = "xsd: String" / >

    < xsd: element name = "LASTNAME-TH" type = "xsd: String" / >

    < xsd: element name = "FORMERNAME" type = "xsd: String" / >

    < xsd: element name = "PREFIX-FR" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERS_NAMEPREFIX-EN" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NAME-IN" type = "xsd: String" / >

    < xsd: element name = "MIDNAME-EN" type = "xsd: String" / >

    < xsd: element name = "LASTNAME-IN" type = "xsd: String" / >

    < xsd: element name = "BIRTH_DT" type = "xsd: Integer" / >

    < xsd: element name = "ÂGE" type = "xsd: Integer" / >

    < xsd: element name = "GENDER" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERNSEXCD" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "MARITAL_STATUS" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERC_MAR_STAT_CD" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "RACE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnRACE" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "RELIGION" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnRELIGION" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NATIONALITY" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnNATIONALITY" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ID_TYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnIDTYPE" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ID_NUMBER" type = "xsd: String" / >

    < xsd: element name = "ID_XPIR_DT" type = "xsd: Integer" / >

    < xsd: element name = "OCCUPATION" >

    < xsd: complexType >

    < xsd: attribute name = "dmnOCCUP_CD" type = "xsd: String" / >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "OCCUP_CLASS" >

    < xsd: complexType >

    < xsd: attribute name = "dmnOCCUP_CLASS_CD" type = "xsd: String" / >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ANNUAL_INCOME" type = "xsd: Integer" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ContactInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "AddressInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Address" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "ADDRTYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnADDR_ADDRTYPE" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "PRIMARY_CONTACT" type = "xsd: Integer" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "PhoneInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Phone" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "PHONETYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnADRP_PHONETYPE" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "PHONENUM" type = "xsd: Integer" / >

    < xsd: element name = "PRIMARY_CONTACT" type = "xsd: Integer" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "EmailInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Email" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "EMAILTYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnADRO_EMAILTYPE" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "EMAILDATA" type = "xsd: String" / >

    < xsd: element name = "PRIMARY_CONTACT" type = "xsd: Integer" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "PolicyInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "BASE-PLAN_CD" type = "xsd: String" / >

    < xsd: element name = "BASE-PLAN_NM" type = "xsd: String" / >

    < xsd: element name = "MODEOFPAYMENT" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnZZFREQUENCY" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "BASE - SA" type = "xsd: float" / >

    < xsd: element name = "BASE-PREMIUM" type = "xsd: float" / >

    < xsd: element name = "BASE-MODALPREMIUM" type = "xsd: float" / >

    < xsd: element name = "AYFP" type = "xsd: float" / >

    < xsd: element name = "RiderInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Rider" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "RIDER-CODE" type = "xsd: String" / >

    < xsd: element name = "RIDER-NAME" type = "xsd: String" / >

    < xsd: element name = "RIDER - SA" type = "xsd: float" / >

    < xsd: element name = "RIDER-PREMIUM" type = "xsd: float" / >

    < xsd: element name = "RIDER-MODALPREMIUM" type = "xsd: float" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "PaymentInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Bordered" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "TMP_RECEIPT_NO" type = "xsd: String" / >

    < xsd: element name = "TOTAL_PYMT_AMT" type = "xsd: float" / >

    < xsd: element name = "Payment" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "PAYER" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPAYRTYPE" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "TYPE PYMT" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPaymentType" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "PYMT-AMT" type = "xsd: float" / >

    < xsd: element name = "PYMT-Channel" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "CreditCard" minOccurs = "0" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "CARD TYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnCardType" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "CARD-NO" type = "xsd: Integer" / >

    < xsd: element name = "CARD-HOLDERNAME" type = "xsd: String" / >

    < xsd: element name = "CARD-BANKNM" type = "xsd: String" / >

    < xsd: element name = "CARD-DISPLAYED" type = "xsd: String" / >

    < xsd: element name = "CARD-AUTHCODE" / >

    < xsd: element name = "CARD-AUTHDATE" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "Bank" minOccurs = "0" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "BANK CODE" / >

    < xsd: element name = "BANK-BRANCH" / >

    < xsd: element name = "BANK-ACCNO" / >

    < xsd: element name = "BANK-ACCNAME" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "Cheque" minOccurs = "0" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "CHQ - NO" / >

    < xsd: element name = "CHQ-DATE" / >

    < xsd: element name = "CHQ-ISSUEBANK" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "RenewalPayment" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "PAYER" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPAYRTYPE" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "DDCHANNEL" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPaymentType" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "DDCDetails" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "CARD TYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnCardType" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "CARD-NO" type = "xsd: Integer" / >

    < xsd: element name = "CARD-HOLDERNAME" type = "xsd: String" / >

    < xsd: element name = "CARD-BANKNM" type = "xsd: String" / >

    < xsd: element name = "CARD-DISPLAYED" type = "xsd: String" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "DDADetails" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "BANK-ACCTYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnBNK_TYP_CD" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "BANK-ACCNO" / >

    < xsd: element name = "BANK-ACCNAME" / >

    < xsd: element name = "BANK-BRANCH" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "BeneficiaryInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Recipient" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "RELATIONSHIP" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnBENE_RELT_CD" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "FIRSTNAME" type = "xsd: String" / >

    < xsd: element name = "MIDNAME" type = "xsd: String" / >

    < xsd: element name = "NAME" type = "xsd: String" / >

    < xsd: element name = "PERCENTAGE" type = "xsd: Integer" / >

    < xsd: element name = "BIRTH_DT" type = "xsd: Integer" / >

    < xsd: element name = "GENDER" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERNSEXCD" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NATLIDNO" type = "xsd: String" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "Questionnaire" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "HealthDeclaration" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Issue" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "QUESTION_ID" type = "xsd: String" / >

    < xsd: element name = "ANSWER" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnZZYESNO_NUM" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ApplicationRs" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Reason for rejection" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < xsd: attribute name = "xsi" type = "xsd: String" / >

    < xsd: attribute name = "schemaLocation" type = "xsd: String" / >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: Schema >

    ');

    BEGIN

    dbms_output.put_line (Ali$ XML_VALID (l_xml, l_xsd));

    END;

    and please do not confused, you don't need to answer if I do not any sense.

    BUT I STILL HAVE ONE LAST QUESTION

    do you know how to use namespaces in the exctractvalue().

    I'm not "troubled", just frustrated that you don't seem to understand what I've explained so far.

    Why do you insist on the use of extractvalue? Don't use extractvalue, it is deprecated, use XMLTABLE instead.

    If you feel compelled to use extractvalue of certain grounds, just the curiosity to seek it in the documentation, you can find the syntax to use the namespaces:

    http://docs.Oracle.com/CD/E11882_01/server.112/e41084/functions061.htm#SQLRF06173

    in your last code, you first insert the XML and extract data from it. I can do it too, but it's not my requirement. I'm supposed to read the first xml (if it is valid) as I do in my code using the table function and make the continuation of the procedure.

    Look, I'll ask you one last time:

    What problem are you having? What prevents you from first reading, certain values before inserting, as you need. Just use the same query XMLTABLE that I showed in my example, except you will not query the table, but directly from the XMLType variable:

    PASSAGE v_xml

    COLUMNS...

  • Problem in creating several attributes XML with the same name of the attribute

    I am trying without success trying to create several attributes XML with the same name, as shown here in a Microsoft example configuration file:



      
         
         
         
      

    I'm calling the NewDocument GetRootElement functions and then "newelement" (appSetting), "newelement" (add)

    Then I call AddAttribute with add, key & Key0, then with add, value & 0.  This seems to work fine but when I try to add the second pair of key & Key1 and value attributes & 1 for item "Add" replaces ""and I find myself with"" only.

    I do something wrong or CVI is not able to create an XML of this type?

    Thank you

    Here's how you do it. I show not to keep things simple error checking.

    #include

    public static void CreateAddElement (mother of CVIXMLElement, const char * key, const char * value)
    {
    Add the CVIXMLElement;
    CVIXMLNewElement (parent, -1, 'Add', &add);)
    CVIXMLAddAttribute (add, "touch", key);
    CVIXMLAddAttribute (add, "value", value);
    CVIXMLDiscardElement (add);
    }

    void main (void)
    {
    CVIXMLElement root, and appSetting;
    Doc CVIXMLDocument.
     
    CVIXMLNewDocument ("configuration", &doc);)
    CVIXMLGetRootElement(doc, &root);)
    CVIXMLNewElement (root,-1, "appSetting", and appSetting);
    CreateAddElement (appSetting, "Key0", "0");
    CreateAddElement (appSetting, "Key1", "1");
    CreateAddElement (appSetting, "Key2", "2");
    CVIXMLDiscardElement (appSetting);
    CVIXMLDiscardElement (root);
    CVIXMLSaveDocument (doc, 1, "c:\\temp\\temp.xml");
    CVIXMLDiscardDocument (doc);
    }

  • building XPath with the XML with the Namespace using PL SQL

    All trying to build the path to each node, when the XML code with no namespace, the following code works very well provide the result

    1 ~/

    2 ~ /Person/

    3 ~ /Person/ âge /

    4 ~ /Person/ homecity /

    5 ~ /Person/ nom /

    6 ~ /Person/ AccueilGuides/lat /

    7 ~ /Person/ AccueilGuides/name /

    8 ~ /Person/ homecity / long /

    But when the XML is changed to

    <person xmlns="urn:person" xmlns:lat="urn:lat">
    <name>Rob</name>
    <age>37</age>
    <homecity>
        <name>London</name>
        <lat>123.000</lat>
        <long>0.00</long>
    </homecity>
    </person>"

    The result of the code below the performance translates into just below result

    1~/
     2~/person/

    In the XML file above, XML namespace is not constant and varies for each XML. My requirement is to analyze the complete XML code, where I can read the XML with namespace and get the result that is mentioned below

    1~/
    2~/person/
    3~/person/age/
    4~/person/homecity/
    5~/person/name/
    6~/person/homecity/lat:lat/
    7~/person/homecity/name/
    8~/person/homecity/long/

    Can you please help me solve the issue mentioned. Thanks in advance. -Code snippet below:

    DECLARE
      l_File VARCHAR2(32000) := '<person>
    <name>Rob</name>
    <age>37</age>
    <homecity>
        <name>London</name>
        <lat>123.000</lat>
        <long>0.00</long>
    </homecity>
    </person>';
     
     l_Where_Clause VARCHAR2(100) := '/*';
     l_Append_Var   VARCHAR2(100) := '/';
     
     TYPE Ty_Paths IS TABLE OF VARCHAR2(1000) INDEX BY PLS_INTEGER;
     l_Ty_Paths      Ty_Paths;
     l_Ty_Paths_Temp Ty_Paths;
     
     TYPE Ty_Verifier IS TABLE OF VARCHAR2(1000) INDEX BY VARCHAR2(1000);
     l_Ty_Varifier Ty_Verifier;
     
    l_Prev_Query_Rec VARCHAR2(100);
    l_Index_Num      NUMBER := 0;
    l_Cur_Exec_Row   NUMBER := 0;
    BEGIN
     l_Ty_Paths(Nvl(l_Ty_Paths.COUNT, 0) + 1) := l_Append_Var;
     l_Cur_Exec_Row := 1;
     
     --Dbms_Output.put_line('Before entering the loop');
     
     LOOP
       l_Ty_Paths_Temp.DELETE;
      SELECT DISTINCT REPLACE(l_Append_Var || '/' || t.Xml || '/', '//', '/') BULK COLLECT
       INTO   l_Ty_Paths_Temp
      FROM   (SELECT Xmltype(Extract(VALUE(e), '/').Getstringval()) .Getrootelement() AS Xml
               FROM   TABLE(Xmlsequence(Extract(Xmltype(l_File), l_Where_Clause))) e) t;
     
      l_Ty_Varifier(Nvl(l_Ty_Varifier.COUNT, 0) + 1) := l_Append_Var;
      --Dbms_Output.put_line('L_TY_PATHS_TEMP.Count::'||L_TY_PATHS_TEMP.Count);
      IF l_Ty_Paths_Temp.COUNT > 0 THEN
         l_Index_Num := Nvl(l_Ty_Paths.COUNT, 0) + 1;
         FOR i IN l_Ty_Paths_Temp.FIRST .. l_Ty_Paths_Temp.LAST LOOP
            l_Ty_Paths(l_Index_Num) := l_Ty_Paths_Temp(i);
            --Dbms_Output.put_line('L_INDEX_NUM::'||L_INDEX_NUM);
            --Dbms_Output.put_line('L_TY_PATHS(L_INDEX_NUM)::'||L_TY_PATHS(L_INDEX_NUM));
            l_Index_Num := l_Index_Num + 1;
         END LOOP;
      END IF;
      --Dbms_Output.put_line('L_TY_PATHS.Count::'||L_TY_PATHS.Count);
      --Dbms_Output.put_line('L_TY_PATHS.Count::'||L_CUR_EXEC_ROW);
     
      IF (NOT l_Ty_Paths.EXISTS(l_Cur_Exec_Row + 1)) OR (l_Cur_Exec_Row = l_Ty_Paths.COUNT) THEN
         --Dbms_Output.put_line('Exiting');
         EXIT;
      ELSE
         --Dbms_Output.put_line('Inside the Else part');
     
         l_Cur_Exec_Row := l_Cur_Exec_Row + 1;
         l_Append_Var   := l_Ty_Paths(l_Cur_Exec_Row);
         l_Where_Clause := l_Ty_Paths(l_Cur_Exec_Row) || '*';
      END IF;
     
      --To Display the record:
         --Dbms_Output.put_line(L_TY_PATHS.Count);
      END LOOP;
      IF l_Ty_Paths.COUNT > 0 THEN
        FOR i IN l_Ty_Paths.FIRST .. l_Ty_Paths.LAST LOOP
          Dbms_Output.Put_Line(i || ' record is ' || l_Ty_Paths(i));
       END LOOP;
     END IF;
     
    END;

    Thank you.

    If you have patterns, it may be easier to work directly on them.

    Here's the idea:

    (1) install "Oracle XML DB manageability Packages", available on the code page for the XML DB sample: http://download.oracle.com/otn/samplecode/xdb_util.zip

    This is a set of utilities which allows us to annotate the XML schemas, to deal with the underlying or storage structure, and (this is the interesting part here) a few views of dictionary to describe the relational XSD structure.

    (it is now an integrated 12 c btw)

    (2) enter these two schemas:

    Start

    () dbms_xmlschema.registerSchema

    schemaURL-online "pacs.002.001.03S2.xsd."

    schemaDoc-online xmltype (bfilename('TEST_DIR','pacs.002.001.03S2.xsd'), nls_charset_id ('AL32UTF8'))

    local-online true

    genTypes-online fake

    genTables-online fake

    enableHierarchy-online dbms_xmlschema. ENABLE_HIERARCHY_NONE

    options-online dbms_xmlschema. REGISTER_BINARYXML

    );

    end;

    /

    Start

    () dbms_xmlschema.registerSchema

    schemaURL-online "SCTCvfBlkCredTrf.xsd."

    schemaDoc-online xmltype (bfilename('TEST_DIR','SCTCvfBlkCredTrf.xsd'), nls_charset_id ('AL32UTF8'))

    local-online true

    genTypes-online fake

    genTables-online fake

    enableHierarchy-online dbms_xmlschema. ENABLE_HIERARCHY_NONE

    options-online dbms_xmlschema. REGISTER_BINARYXML

    );

    end;

    /

    (3) the following query built all the paths of node defined by the main schema (SCTCvfBlkCredTrf.xsd), as well as the namespaces:

    with schema_list (schema_url, schema_owner) as)

    Select 'SCTCvfBlkCredTrf.xsd', 'OTN' from dual

    Union of all the

    Select sd.dep_schema_url, sd.dep_schema_owner

    of schema_list sl

    Join dba_xml_schema_dependency on sd.schema_url = sl.schema_url sd

    and sd.schema_owner = sl.schema_owner

    ),

    namespace_mapping (target_namespace, prefix) as long as)

    Select target_namespace

    , « ns » || ROW_NUMBER() (order target_namespace) as a prefix

    of user_xml_schema_namespaces

    where schema_url in (select schema_url from schema_list)

    ),

    () schema_nodes

    is_attr

    node_name

    max_occurs

    element_id

    parent_element_id

    target_namespace

    schema_url

    ) as)

    Select 0

    element_name as node_name

    xmlcast)

    XMLQUERY ('/ XS: ELEMENT / ' @maxOccurs passing returning content element)

    as varchar2 (10)

    )

    element_id

    parent_element_id

    target_namespace

    schema_url

    of user_xml_schema_elements

    where schema_url in (select schema_url from schema_list)

    Union of all the

    Select 1

    attribute_name as node_name

    null

    null

    element_id

    target_namespace

    schema_url

    of user_xml_schema_attributes

    where schema_url in (select schema_url from schema_list)

    )

    Select the level

    sn.node_name

    sn.max_occurs

    connect_by_isleaf as is_leaf

    sys_connect_by_path)

    -case when ns.prefix is not null and is_attr = 0 then ns.prefix | ':' end |

    -case when sn.is_attr = 1 then ' @' end |

    SN. NODE_NAME

    , '/'

    ) as xpath

    -, target_namespace

    of schema_nodes sn

    outer join ns namespace_mapping let ns.target_namespace = sn.target_namespace

    Connect prior sn.element_id = sn.parent_element_id

    Start with sn.schema_url = "SCTCvfBlkCredTrf.xsd".

    and sn.parent_element_id is null

    ;

    LEVEL MAX_OCCURS IS_LEAF XPATH NODE_NAME
    ----- ------------------ ---------- ------- ----------------------------------------------------------------------------------------------------------
    1 SCTCvfBlkCredTrf 0 /ns2:SCTCvfBlkCredTrf
    2 1 SndgInst /ns2:SCTCvfBlkCredTrf / ns2:SndgInst
    2 1 RcvgInst /ns2:SCTCvfBlkCredTrf / ns2:RcvgInst
    2 1 SrvcId /ns2:SCTCvfBlkCredTrf / ns2:SrvcId
    2 1 TstCode /ns2:SCTCvfBlkCredTrf / ns2:TstCode
    2 FType 1 /ns2:SCTCvfBlkCredTrf / ns2:FType
    2 FileRef 1 /ns2:SCTCvfBlkCredTrf / ns2:FileRef
    2 1 FileDtTm /ns2:SCTCvfBlkCredTrf / ns2:FileDtTm
    2 1 OrigFRef /ns2:SCTCvfBlkCredTrf / ns2:OrigFRef
    2 1 OrigFName /ns2:SCTCvfBlkCredTrf / ns2:OrigFName
    2 1 OrigDtTm /ns2:SCTCvfBlkCredTrf / ns2:OrigDtTm
    2 1 FileRjctRsn /ns2:SCTCvfBlkCredTrf / ns2:FileRjctRsn
    2 1 FileBusDt /ns2:SCTCvfBlkCredTrf / ns2:FileBusDt
    2 1 FileCycleNo /ns2:SCTCvfBlkCredTrf / ns2:FileCycleNo
    2 FIToFIPmtStsRptS2 1 /ns2:SCTCvfBlkCredTrf 0 / ns2:FIToFIPmtStsRptS2
    3 GrpHdr 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:GrpHdr
    4 MsgId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:GrpHdr / ns1:MsgId
    4 CreDtTm 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:GrpHdr / ns1:CreDtTm
    4 InstgAgt 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:GrpHdr / ns1:InstgAgt
    5 FinInstnId 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:GrpHdr / ns1:InstgAgt / ns1:FinInstnId
    6 BIC 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:GrpHdr / ns1:InstgAgt / ns1:FinInstnId / ns1:BIC
    3 OrgnlGrpInfAndSts 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts
    4 OrgnlMsgId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:OrgnlMsgId
    4 OrgnlMsgNmId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:OrgnlMsgNmId
    4 OrgnlNbOfTxs 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:OrgnlNbOfTxs
    4 OrgnlCtrlSum 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:OrgnlCtrlSum
    4 GrpSts 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:GrpSts
    4 StsRsnInf 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf
    5 Orgtr 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Orgtr
    6 id 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Orgtr / ns1:Id
    7 OrgId 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Orgtr / ns1:Id / ns1:OrgId
    8 1 BICOrBEI /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Orgtr / ns1:Id / ns1:OrgId / ns1:BICOrBEI
    5 ARS 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Rsn
    6 Cd 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Rsn / ns1:Cd
    6 Prtry 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Rsn / ns1:Prtry
    4 NbOfTxsPerSts 2 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:NbOfTxsPerSts
    5 1 DtldNbOfTxs /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:NbOfTxsPerSts / ns1:DtldNbOfTxs
    5 1 DtldSts /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:NbOfTxsPerSts / ns1:DtldSts
    5 1 DtldCtrlSum /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:NbOfTxsPerSts / ns1:DtldCtrlSum
    3 TxInfAndSts boundless 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts
    4 StsId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsId
    4 OrgnlInstrId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlInstrId
    4 OrgnlEndToEndId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlEndToEndId
    4 OrgnlTxId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxId
    4 TxSts 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:TxSts
    4 StsRsnInf 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf
    5 Orgtr 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Orgtr
    6 id 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Orgtr / ns1:Id
    7 OrgId 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Orgtr / ns1:Id / ns1:OrgId
    8 1 BICOrBEI /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Orgtr / ns1:Id / ns1:OrgId / ns1:BICOrBEI
    5 ARS 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Rsn
    6 Cd 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Rsn / ns1:Cd
    6 Prtry 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Rsn / ns1:Prtry
    4 InstdAgt 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:InstdAgt
    5 FinInstnId 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:InstdAgt / ns1:FinInstnId
    6 BIC 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:InstdAgt / ns1:FinInstnId / ns1:BIC
    4 OrgnlTxRef 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef
    5 IntrBkSttlmAmt 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:IntrBkSttlmAmt
    CTL 6 1 /ns2:SCTCvfBlkCredTrf/ns2:FIToFIPmtStsRptS2/ns1:TxInfAndSts/ns1:OrgnlTxRef/ns1:IntrBkSttlmAmt/@Ccy
    5 1 IntrBkSttlmDt /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:IntrBkSttlmDt
    5 DbtrAgt 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:DbtrAgt
    6 FinInstnId 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:DbtrAgt / ns1:FinInstnId
    7 1 BIC /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:DbtrAgt / ns1:FinInstnId / ns1:BIC
    5 CdtrAgt 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:CdtrAgt
    6 FinInstnId 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:CdtrAgt / ns1:FinInstnId
    7 1 BIC /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:CdtrAgt / ns1:FinInstnId / ns1:BIC

    In fact, you would be generally extracted from mapping data in a separate query so that you can use it to build the dynamic with XMLNamespaces clause of the namespace.

    NB1: Also note that not all roads are needed, only those which IS_LEAF = 1 or MAX_OCCURS = "unlimited" or MAX_OCCURS > '1', then you can add a filter predicate in the query directly.

    NB2: The query does support all the features of XSD, for example, I've relied on the default behavior for attributes 'element_form_default' and 'attribute_form_default '.

  • Demarshalling xml with the automatically generated class JAXB2.0 file does not work in jdeveloper 11.1.1.9

    I'm trying to familiarize themselves with JAXB in jdeveloper. I am facing some problems. There are a few test cases for which he works, for others it is not.

    Case 1:

    XML file is created manually. Respective java class to xmlelements is created manually. There is no ObjectFactory.java or jaxb.properties. Demarshalling this XML file works fine.

    Case 2:

    XML file is not created manually. All the respective java classes including ObjectFactory.java and jaxb.properties are generated using the widget ' JAXB 2.0 content XML Schema model "jdeveloper. I deleted ObjectFactory.java, jaxb.properties, and package - info.java. Demarshalling xml with this class file works fine.


    Case 3:

    Even in case 2, but this time I do not delete or change whatever it is generated and used as it is. It does not work. Get the following error.

    Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
    javax.xml.bind.UnmarshalException
     - with linked exception:
    [Exception [EclipseLink-25008] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: A descriptor with default root element rss was not found in the project]
      at org.eclipse.persistence.jaxb.JAXBUnmarshaller.handleXMLMarshalException(JAXBUnmarshaller.java:816)
      at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:109)
      at com.example.jaxbintro.JAXBExampleClass.main(JAXBExampleClass.java:36)
    Caused by: Exception [EclipseLink-25008] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: A descriptor with default root element rss was not found in the project
      at org.eclipse.persistence.exceptions.XMLMarshalException.noDescriptorWithMatchingRootElement(XMLMarshalException.java:129)
      at org.eclipse.persistence.internal.oxm.record.SAXUnmarshallerHandler.startElement(SAXUnmarshallerHandler.java:208)
      at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1598)
      at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:455)
      at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:401)
      at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:239)
      at org.eclipse.persistence.internal.oxm.record.XMLReader.parse(XMLReader.java:157)
      at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:688)
      at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:271)
      at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:258)
      at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:218)
      at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:306)
      at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:106)
      ... 1 more
    

    The project is included in the annex to this issue. It is ready for use. More information in the commentary to the java code. The main class is JAXBExampleClass.java.

    What is the problem with case 3?

    OK, I've been messing around with codes generated a bit and found the solution. The problem is that the value of the XmlSchema namespace had error in package - info.java class. There is no specified XmlSchema namespace in the XML file. Thus, the given value in the package - info.java was wrong.

    @javax.xml.bind.annotation.XmlSchema (namespace = "http://www.example.org", value / / wrong, set it to an empty string or that of your xml file, if it has any)

    elementFormDefault =

    javax.xml.bind.annotation.XmlNsForm.QUALIFIED)

    package com.example.jaxbintro.xmlerror;

    After you set the namespace to the empty string, since my xml file do not have one, code ran very well.

    @javax.xml.bind.annotation.XmlSchema (namespace = "",)

    elementFormDefault =

    javax.xml.bind.annotation.XmlNsForm.QUALIFIED)

    package com.example.jaxbintro.xmlerror;

    The file package - info.java can also be removed and it will work. For more details on the package and XmlSchema annotated level, what information on the package class is for, be found in the following link.

    https://JAXB.Java.NET/NoNAV/jaxb20-FCS/docs/API/javax/xml/bind/annotation/XmlSchema.html

  • Please help to read the XML with XMLTable

    Hi gurus,

    I'm not very familiar with XML parsing. It seems to me that it should be very easy to get the data. For some reason, I'm having a problem to get the data.

    SELECT *.
    OF e util.hlsr_online_entries,.
    XMLTABLE)
    XmlNamespaces)
       ' http://tempuri.org/ '    as "dt",
    ("urn: schemas-microsoft-com: XML-diffgram-v1" as "dg").

    "/ DataTable / dg:diffgram/DocumentElement/JrShowCustomerHeifers.
    PASSAGE XMLTYPE (e.entry_data)
    COLUMNS
    SeqNo TO the ORDINALITE,
    DocumentID NUMBER PATH "DocumentID",.
    PATH of VARCHAR2 (100) ClubName "ClubName") as test
    WHERE e.ref_id = 33422

    The query above does all the data for me. My hunts is the problem with the tab DocumentElement. I tried a different variant management.

    Please help me to resolve the application

    I have the XML document following the DotNet developer

    <? XML version = "1.0" encoding = "utf-8"? >

    " < DataTable xmlns =" http://tempuri.org/ ">

    < xs: Schema id = "NewDataSet" xmlns = "" "xmlns: XS =" " http://www.w3.org/2001/XMLSchema " "xmlns:msdata ="urn: schemas-microsoft-com: xml-msdata" >

    < xs: element name = "NewDataSet" msdata:IsDataSet = "true" msdata:MainDataTable = "JrShowCustomerHeifers" msdata:UseCurrentLocale = "true" >

    < xs: complexType >

    < xs: Choice minOccurs = "0" maxOccurs = "unbounded" >

    < xs: element name = "JrShowCustomerHeifers" >

    < xs: complexType >

    < xs: SEQUENCE >

    < xs: element name = "DocumentID" type = "xs: int" minOccurs = "0" / >

    < xs: element name = "ClubName" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "Name" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "FirstName" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "PreferredName" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "Email" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "Exhibitor" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "AnimalName" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "RegistryNo" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "DateofBirth" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "NameofSire" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "SireRegistryNo" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "NameofDam" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "DamRegistryNo" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "Tattoo" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "SecondaryTattoo" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "UniversalIDNumber" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "Tattoo_Location" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "Secondary_Tattoo_Location" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "OracleBreedID" type = "xs: int" minOccurs = "0" / >

    < xs: element name = "JrValidationBreedName" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "ValidationDate" type = "xs: DateTime" minOccurs = "0" / >

    < xs: element name = "ValidatedBy" type = "xs: String" minOccurs = "0" / >

    < xs: element name = "ValidationComment" type = "xs: String" minOccurs = "0" / >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < / xs: element >

    < / xs: Choice >

    < / xs: complexType >

    < / xs: element >

    < / xs: Schema >

    < xmlns:msdata = diffgr:diffgram "" urn: schemas-microsoft-com: xml-msdata "xmlns:diffgr =" urn: schemas-microsoft-com: XML-diffgram-v1 ">"

    < DocumentElement xmlns = "" >

    < JrShowCustomerHeifers diffgr: ID = "JrShowCustomerHeifers1" msdata:rowOrder = "0" >

    < > 18442 DocumentID < / DocumentID >

    < ClubName > Perrin FFA < / ClubName >

    Hamman < name > < / LastName >

    < FirstName > Charles < / name >

    < email > [email protected] < / email >

    < setting > hammam, Charles < / Exhibitor >

    < > 113 AnimalName < / AnimalName >

    < RegistryNo > C1026447 < / RegistryNo >

    < DateofBirth > 14/01/2013 < / DateofBirth >

    < NameofSire > 808 808 DAYS of MATCH LH < / NameofSire >

    < SireRegistryNo > C961101 < / SireRegistryNo >

    SADIE 7/7 < NameofDam > < / NameofDam >

    < DamRegistryNo > C941067 < / DamRegistryNo >

    < > 113 tattoo < / tattoo >

    < SecondaryTattoo / >

    < UniversalIDNumber > 1194F020 < / UniversalIDNumber >

    < Tattoo_Location > TATTOO - left ear < / Tattoo_Location >

    < Secondary_Tattoo_Location / >

    < OracleBreedID > 6383 < / OracleBreedID >

    Beefmaster < JrValidationBreedName > < / JrValidationBreedName >

    < ValidationDate > 2014-11-25T 08: 39:00 - 06:00 < / ValidationDate >

    < ValidatedBy > laineyb < / ValidatedBy >

    < ValidationComment / >

    < / JrShowCustomerHeifers >

    < JrShowCustomerHeifers diffgr: ID = "JrShowCustomerHeifers2" msdata:rowOrder = "1" >

    < > 18473 DocumentID < / DocumentID >

    < ClubName > Perrin FFA < / ClubName >

    Hamman < name > < / LastName >

    < FirstName > Charles < / name >

    < email > [email protected] < / email >

    < setting > hammam, Charles < / Exhibitor >

    < AnimalName > PURPLE CORALEE 349 KPH < / AnimalName >

    < RegistryNo > P43461953 < / RegistryNo >

    < DateofBirth > 04/11/2013 < / DateofBirth >

    < NameofSire > PURPLE MOXY 22 X AND < / NameofSire >

    < SireRegistryNo > P43126458 < / SireRegistryNo >

    < NameofDam > TCC CORKY 6603 < / NameofDam >

    < DamRegistryNo > P42457119 < / DamRegistryNo >

    < > 349 tattoo < / tattoo >

    < SecondaryTattoo > km/h < / SecondaryTattoo >

    < UniversalIDNumber > 1194F021 < / UniversalIDNumber >

    < Tattoo_Location > TATTOO - left ear < / Tattoo_Location >

    < Secondary_Tattoo_Location > TATTOO - right ear < / Secondary_Tattoo_Location >

    < OracleBreedID > 6389 < / OracleBreedID >

    < JrValidationBreedName > Polled Hereford < / JrValidationBreedName >

    < ValidationDate > 2014 - 12-01 T 11: 55:00 - 06:00 < / ValidationDate >

    Hannah < ValidatedBy > < / ValidatedBy >

    < ValidationComment / >

    < / JrShowCustomerHeifers >

    < JrShowCustomerHeifers diffgr: ID = "JrShowCustomerHeifers3" msdata:rowOrder = "2" >

    < > 18474 DocumentID < / DocumentID >

    < ClubName > Perrin FFA < / ClubName >

    Hamman < name > < / LastName >

    < FirstName > Charles < / name >

    < email > [email protected] < / email >

    < setting > hammam, Charles < / Exhibitor >

    < AnimalName > LANGFORDS SWEET N SOUR 4107 < / AnimalName >

    < RegistryNo > 43504761 < / RegistryNo >

    < DateofBirth > 02/03/2014 < / DateofBirth >

    < NameofSire > LH TNT 1017 < / NameofSire >

    < SireRegistryNo > 43199794 < / SireRegistryNo >

    < NameofDam > LANGFORDS LADY 2206 AND < / NameofDam >

    < DamRegistryNo > 43315143 < / DamRegistryNo >

    < > 4107 tattoo < / tattoo >

    < SecondaryTattoo / >

    < UniversalIDNumber > 1194F018 < / UniversalIDNumber >

    < Tattoo_Location > TATTOO - left ear < / Tattoo_Location >

    < Secondary_Tattoo_Location / >

    < OracleBreedID > 6398 < / OracleBreedID >

    Hereford < JrValidationBreedName > < / JrValidationBreedName >

    < ValidationDate > 2014-11-24T 14:26:00 - 06:00 < / ValidationDate >

    Validator < ValidatedBy > < / ValidatedBy >

    < ValidationComment / >

    < / JrShowCustomerHeifers >

    < JrShowCustomerHeifers diffgr: ID = "JrShowCustomerHeifers4" msdata:rowOrder = "3" >

    < > 18475 DocumentID < / DocumentID >

    < ClubName > Perrin FFA < / ClubName >

    Hamman < name > < / LastName >

    < FirstName > Charles < / name >

    < email > [email protected] < / email >

    < setting > hammam, Charles < / Exhibitor >

    < AnimalName > PURPLE CCC 19A LYDIA < / AnimalName >

    < RegistryNo > P43406978 < / RegistryNo >

    < DateofBirth > 05/02/2013 < / DateofBirth >

    < NameofSire > PURPLE MB WOMANIZER 14UET < / NameofSire >

    < SireRegistryNo > P42945146 < / SireRegistryNo >

    < NameofDam > PURPLE CMCC NASTIA 9U < / NameofDam >

    < DamRegistryNo > P42927201 < / DamRegistryNo >

    < > 19A tattoo < / tattoo >

    < SecondaryTattoo / >

    < UniversalIDNumber > 1194F017 < / UniversalIDNumber >

    < Tattoo_Location > TATTOO - left ear < / Tattoo_Location >

    < Secondary_Tattoo_Location / >

    < OracleBreedID > 6389 < / OracleBreedID >

    < JrValidationBreedName > Polled Hereford < / JrValidationBreedName >

    < ValidationDate > 2014 - 12-01 T 11: 55:00 - 06:00 < / ValidationDate >

    Hannah < ValidatedBy > < / ValidatedBy >

    < ValidationComment / >

    < / JrShowCustomerHeifers >

    < JrShowCustomerHeifers diffgr: ID = "JrShowCustomerHeifers5" msdata:rowOrder = "4" >

    < > 18477 DocumentID < / DocumentID >

    < ClubName > Perrin FFA < / ClubName >

    Hamman < name > < / LastName >

    < FirstName > Charles < / name >

    < email > [email protected] < / email >

    < setting > hammam, Charles < / Exhibitor >

    < AnimalName > PURPLE SGW EDEN 12 b < / AnimalName >

    < RegistryNo > P43521932 < / RegistryNo >

    < DateofBirth > 02/04/2014 < / DateofBirth >

    < NameofSire > first TIME's a WASTINe 0124 < / NameofSire >

    < SireRegistryNo > 43123163 < / SireRegistryNo >

    < NameofDam > PURPLE SM WONDER WOMAN 160Y < / NameofDam >

    < DamRegistryNo > P43235169 < / DamRegistryNo >

    < tattoo > 12 b < / tattoo >

    < SecondaryTattoo > 12 b < / SecondaryTattoo >

    < UniversalIDNumber > 1194F015 < / UniversalIDNumber >

    < Tattoo_Location > TATTOO - left ear < / Tattoo_Location >

    < Secondary_Tattoo_Location > TATTOO - right ear < / Secondary_Tattoo_Location >

    < OracleBreedID > 6389 < / OracleBreedID >

    < JrValidationBreedName > Polled Hereford < / JrValidationBreedName >

    < ValidationDate > 2014 - 12-01 T 11: 56:00 - 06:00 < / ValidationDate >

    Hannah < ValidatedBy > < / ValidatedBy >

    < ValidationComment / >

    < / JrShowCustomerHeifers >

    < / DocumentElement >

    < / diffgr:diffgram >

    < / DataTable >

    user12021633 wrote:

    Regarding your suggestion, I've never used the syntax of FLWOR. I'll try to implement if I can make it work.

    "FLWOR is the abbreviation of ' for Let's where Order by Return" and refers to the full form of an XQuery query expression.

    Do you think it would be faster than the way I have the values?

    You have used a FLWOR expression (the 'for' + 'return' part of it) in this post: Re: Please help to read the XML with XMLTable

    And I have already said: do not use in this case.

    Faster or slower isn't the point. Oracle will evaluate the expression in the same way.

    But from a maintenance point of view, it's obviously much easier to use a simple XPath expression like this:

    /DT:GetJrShowCustomerHeifersResponse / dt:GetJrShowCustomerHeifersResult / dg:diffgram/DocumentElement/JrShowCustomerHeifers

  • Plugin XML and XPath?

    I guess that if the question is marked as answer, nobody has no interest left against it.

    So I repost this as a new question.

    Is it possible to use XPath expressions to find nodes XML with XML plugin?

    Examples if this is possible?

    Thank you.

    PS. somewhere on the forum I saw the answer in a year or a few years ago that XPath is supported by Orchestrator, but the person who promised to find the time to show some examples very probably forgot to do.

    Find an introduction to the equivalent E4X and xpath for E4X here: http://wso2.org/project/mashup/0.2/docs/e4xquickstart.html

    Just E4X amortization is true for support in browsers. E4X is part of the standard javascript, it will not go away in vCO.

    See you soon,.

    Joerg

  • How to add xml with existing xml content

    Hello

    I have a requirement where I need to add the xml with the existing xml content.

    For example: this is the entry that I get every time in a loop for

    in loop1:

    < ParentType >

    < a > < /A > abcd

    < B > < /B > abcd

    < / ParentType >

    loop2 once again I get this entry.

    < ParentType2 >

    ABCD < c >/< c >

    ABCD < d >/< d: >

    < / ParentType2 >

    now my requirement is to add this XML in a variable, which is finally at the end of the loop for it should look like this

    < ParentType >

    < a > < /A > abcd

    < B > < /B > abcd

    < / ParentType >

    < ParentType2 >

    ABCD < c >/< c >

    ABCD < d >/< d: >

    < / ParentType2 >

    Thank you

    Solved my problem.

Maybe you are looking for