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.

Tags: BlackBerry Developers

Similar Questions

  • Keep the white space with SAX parser?

    Is it possible to create a SAX parser that will result in white space and end forming part of the content of the element? SAX of RIM parser removes beginning and white space, even for documents that do not have DTD or schema. ("The Analyzer provides the same character data for")

    ABC

    "as for.

    ABC

    ".)  He also apparently adjusts white space even when it is represented as a character entity (for example, & #32 or when the element has XML: Space = "preserve" attribute.) All of these behaviors are contrary w3 care about XML processing. Normally, I just call setPreserveWhitespace (true), but unfortunately, implementation of the SAXParser RIM does not include this method.

    I don't know if it might help, but if your SAXparser class extends DefaultHandler, is a manager of ignorableWhitespace methods... I have not used, but just to let you know. Hope this helps

  • 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.

  • 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)

  • 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

  • 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);
    
    ...
    
  • Parses a string with a SAX parser

    Hello

    I developed a returned from the XML web service. This XML file is intended to be analyzed by the blackberry.

    I am currently unable to deploy the web service, that what I did to test it is copy the result in a string and store it in the program.

    When I try to analyse if I get an exception: SaxParseException: wait until the end of the file (I watched with the debugger and the row and the column of two exceptions are - 1).

    String test = Oas.DUMMY_ANSWER;
    SAXParserFactory factory = SAXParserFactory.newInstance();
    SAXParser saxParser = factory.newSAXParser();
    System.out.println("DEBUG: " + test);
    InputStream in = new ByteArrayInputStream(test.getBytes("UTF-8"));
    ReportHandler handler = new ReportHandler();
    
    saxParser.parse(in, handler);
    

    Oas.DUMMY_ANSWER is a very long, pasted from Notepad.

    It has also tested ByteArrayInputStream (test.getBytes ()) new; but no more chance.

    If anyone can help?

    My French is not a lot.

    But I think that you do not get the exception when you replace the test with "" and ask yourself if it's limited to strings directly in the code?

    I have a virtually identical to your code, data processing I was sent by a server.  It works very well.

    But the SAXParseException does not indicate that you have an a problem XML with the string you pass in.  He'll tell you line and column number, which may be useful given that you printed the string beforehand.  It will also give you a message to tell you what the problem is.  If it is not, then if you have some kind of debugging in your manager, you will be able to understand the last bit of XML transformed.

    To verify your XML file, your code is fine (certainly better than my French!).

  • Writeback OBIEE Sax parser error expected with ampersand gt/lt entity name

    Hello
    I activated OBIEE 10.1.3.3.2 on Suse Linux 9.x writeback successfully for an OBIEE report, however if one of the fields contains XML special characters such as the ampersand, lower to higher symbols etc. When I save I get error:
    An error occurred writing to the server. Please check that you have entered the proper values. If the problem persists, contact your system administrator.
    SAX parser returned an exception. Message: Name of entity expected to reference, entity publicId:, systemId entity:, line number: 1, number of column: 795
    Error details
    Error codes: UH6MBRBC:E6MUPJPH
    XML parsed: writeBack model = "entry" > < record action = "Refresh" > < value columnID 'c10' = > C < / value > < value columnID = "c2" > Jun-08 < / value > < value columnID = "c5" > 0001 < / value > < value columnID 'c1' = > NET INCOME < / value > < value columnID 'c7' = > T000 < / value > < value columnID 'c3' = > Total X & X < / value >...

    I really don't want to have to use the function replace on all fields in the report to remove special characters + train users not to go into the editable field.

    Anyone got any ideas how to get around this problem?

    Thank you
    Gareth

    10.3.3.4 solves half of this... I don't recal exactly...

    but they added in the writeback.js file, replace a function for two reserved signs ('&' and '<' ).="" they="" didn't="" add="" '="">' and subsequently one - forget that is...)

    If you don't want to upgrade - I would just change the code as they did in 10.3.3.4 - it's easy...

  • Reading for sax parser input stream

    Hi all

    I'm coding using JDE 4.6 on BB 9000 with Eclipse Simulator.

    I received several thrusts in my BlackBerry app in succession.  Can be anywhere from 5 to 17 distinct growth of xml data.  I use a sax parser to go through the XML and get into my objects.

    First of all, I need to read the first xml node to see what type of data it is.  Once I know I then called the appropriate sax xml parser.  The problem is that if I'm reading the input stream for the first node in the xml, the input stream gets consumed (i.e. missing).  I now know what it contained, but now I can't parse through the xml data that I don't have an input stream to the sax parser.

    What I've done so far has been to make a copy of the input stream (I made my own copy of the input stream class. So I then 2 input streams.  The first one I use to see what is in the first xml node.  Once I know I use the sax parser to analyze if the second input stream.  It has been working great until now.

    Problems appeared now.  Usually, I make a copy of the first input stream (push) receive very well, but no matter what input streams received after that who could not get copied correctly through my copy of the input stream class.  It gets stuck on this line.

    _copy.write(data, 0, chunk);
    

    Questions

    (1) is there a way to see what is in the first node of the input xml stream without consuming?

    (2) made a copy of the input stream a good idea?

    (3) any suggestions?

    Here's my copy of the input stream class

    public class CopyInputStream
    {
        private InputStream _is;
        private NoCopyByteArrayOutputStream _copy;
    
        public CopyInputStream(InputStream is)
        {
            _is = is;
    
            try
            {
                copy();
            }
            catch(IOException ex)
            {
                System.out.println("IOException in CopyInputStream");
                System.out.println(ex.toString());
                // do nothing
            }
        }
    
        private int copy() throws IOException
        {
            _copy = new NoCopyByteArrayOutputStream();
            int read = 0;
            int chunk = 0;
            byte[] data = new byte[256];
    
            while(-1 != (chunk = _is.read(data)))
            {
                read += data.length;
                System.out.println("chunk = " + chunk);
                System.out.println("read = " + read);
    
                _copy.write(data, 0, chunk);  <----------- Seems to stall here every once in a while.
    //          _copy.flush();
            }
    
            return read;
        }
    
        public InputStream getCopy()
        {
            return (InputStream)new ByteArrayInputStream(_copy.toByteArray());
        }
    }
    

    You don't have to pass the input stream. As you note, a Manager do not have (or need) access to it. The parser calls your handler to process the events 'sax', as the stream is processed. The idea is to have your top-level manager only directly manage events until it determines the type of data in the message. (From what you describe, it probably occurs for the root element startElement event of the document.) When the first level manager determines this, he creates a delegated manager of correct type and stores it in a member variable. After that, as the parser continues to send events to the next level manager, it simply passes these events on the delegated manager.

    Once the analysis is complete, the results of the analysis would have distributed between the top-level manager and the delegated manager that he created.

    Assume that your element the document root is 'success' or 'failure', where the two types of documents require very different treatment. The basic idea would be something like this:

    public class TopLevelHandler extends DefaultHandler {
      public DefaultHandler delegate;
      public startElement(String uri, String localName, String qName, Attributes attributes) {
        if (delegate != null) {
          delegate.startElement(uri, localName, qName, attributes);
        else if ("success".equals(qName)) {
          delegate = new SuccessHandler();
        } else if ("failure".equals(qName)) {
          delegate = new FailureHandler();
        }
      }
      public endElement(String uri, String localName, String qName) {
        if (delegate != null) {
          delegate.endElement(uri, localName, qName);
        } // else event ignored
      }
      // etc.
    }
    
  • Analysis of XML base using E4X syntax

    Hello

    I'm going crazy with E4X parsing. I'm trying to parse an XML document that is rather simple, but I can't seem to find a way to analyze what I need.

    I try to extract the name of vApps (VAPP only 1 in this example):

    var xmldoc = new XML(test);
    if (!xmldoc) {
      System.debug("XML PAS BON");
      var errorCode = "Invalid XML Document";
      throw "Invalid XML document";
    }
    System.debug("test 1 : "+xmldoc..AdminVAppRecord.@name);
    
    

    It's (a response to vCloud Director REST API 5.1) XML content:

    <?xml version="1.0" encoding="UTF-8"?>
    <QueryResultRecords xmlns="http://www.vmware.com/vcloud/v1.5" total="1" pageSize="25" page="1" name="adminVApp" type="application/vnd.vmware.vcloud.query.idrecords+xml" href="https://myvcloudhost.com/api/admin/extension/vapps/query?page=1&pageSize=25&format=idrecords&filter=isExpired==true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://myvcloudhost.com/api/v1.5/schema/master.xsd">
      <Link rel="alternate" type="application/vnd.vmware.vcloud.query.references+xml" href="https://myvcloudhost.com/api/admin/extension/vapps/query?page=1&pageSize=25&format=references&filter=isExpired==true"/>
      <Link rel="alternate" type="application/vnd.vmware.vcloud.query.records+xml" href="https://myvcloudhost.com/api/admin/extension/vapps/query?page=1&pageSize=25&format=records&filter=isExpired==true"/>
      <AdminVAppRecord vdcName="john-vdc" vdc="urn:vcloud:vdc:4cc245-23f0-439a-9b98-e85319106af1" storageKB="8388608" status="SUSPENDED" ownerName="system" org="urn:vcloud:org:19893ffe-b5de-40a6-9a08-307e41ac0f49" numberOfVMs="1" name="qsdqs" memoryAllocationMB="3072" isVdcEnabled="true" isInMaintenanceMode="false" isExpired="true" isEnabled="true" isDeployed="false" isBusy="false" creationDate="2013-08-02T15:01:39.260+02:00" cpuAllocationMhz="2" id="urn:vcloud:vapp:fe07c653-4848-4f03-a1f8-ddba8da13a50" honorBootOrder="false" pvdcHighestSupportedHardwareVersion="9" cpuAllocationInMhz="4000" taskStatus="success" lowestHardwareVersionInVApp="9" task="urn:vcloud:task:090db9f8-4b04-4550-a1a3-5396c4f25043" autoDeleteDate="2013-08-10T17:47:56.683+02:00" numberOfCpus="2" taskStatusName="vdcUpdateVapp"/>
    </QueryResultRecords>
    

    Could someone give me a hand on this one? I believe that an example of work would be enough for me to start the analysis correctly.

    Thank you for your help.

    A few errors here:

    1. your XML file is not correct because it contains no sequence of escape '&' characters; they should be replaced by '& '.

    2. your XML elements are in a namespace (see "xmlns" attribute), but your E4X query is not. You must define the namespace, for example

    var vcloud = new Namespace("http://www.vmware.com/vcloud/v1.5");
    

    and then the query will become

    System.log("test 1 : " + xmldoc.vcloud::AdminVAppRecord.@name);
    

    Hope this helps,

    -Ilian

  • 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

  • What is the recommended API for reading/analysis of XML in Java files?

    Hello, everyone!

    In my application, I have to read a XML file. I think that Java has several APIs to parse XML files and as I am new to this, I would like to know from you what is the recommended Java for this API.

    Thank you.

    Marcos

    Unless you plan to edit nodes and I would recommend that you use a Sax parser, which is a lot less hunger of memory as a DOM parser. The DOM parser to read the entire document in memory for the manipulation of the user.
    If you are looking only to read the document and extract specific values then a DOM parser would be an exaggeration. If you are planning leave the document unchanged then a SAX parser is the way to go - a little more complex to write but worth the extra as it will be faster and more scalable.

  • 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);
    }

  • 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...

Maybe you are looking for