Truncate Node: ORA-31167: XML nodes over 64K in size cannot be inserted

I'm trying to migrate from a mysql platform to oracle. Mostly because the spatial engine from mysql sucks.
I'm using Oracle-XE. I'm trying to import GeoCaching gpx files. The file contains 500 waypoints and one of the waypoints has a description greater than 64K. Since a palm pda can't handle that much text in CacheMate I'm fine with truncating the node.
Is there a way to tell XMLType to truncate any node over 64K?
Thanks.

Hello,
I am also running into this problem using and Oracle 10.1.0.5 version of the database. Unfortunately I do not see our customer updating their version in the near future.
I am inserting customer data into a table with an XMLType column. There is currently no problem with inserting the data and as far as I can tell this data is not being truncated. However, when fetching this data I get the ORA-31167 error. It seems that when I execute the parser to fetch, using the extractvalue method to sort the result set based on nodes in the XMLType column.
My solutions seem limited as I must present the data in a user defined order, I can not change the content of the XML and the customer will not be updating their version of oracle soon. Is there another way around this problem ?

Similar Messages

  • ORA-31167: XML nodes over 64K in size cannot be inserted -rdbms 10.2.0.4

    Hi.
    trying to load large XML onto a 10.2.0.4 database - using sqlldr. The logfile shows:
    Record 1: Rejected - Error on table LOAD_BS_XML.
    ORA-31167: XML nodes over 64K in size cannot be inserted
    ORA-06512: at "SYS.XMLTYPE", line 5
    My XSD:
                        <xs:element name="Orders" minOccurs="0" maxOccurs="unbounded">
                             <xs:element name="Picture" type="xs:base64Binary" minOccurs="0" xdb:SQLType="BLOB"/>
    ..Is there a way to circumvent this limit - without upgrading to 11gR2?
    /Claus
    Edited by: user500977 on Dec 6, 2011 8:41 AM
    Edited by: user500977 on Dec 6, 2011 8:42 AM
    Edited by: user500977 on Dec 6, 2011 8:43 AM

    Hello,
    I am also running into this problem using and Oracle 10.1.0.5 version of the database. Unfortunately I do not see our customer updating their version in the near future.
    I am inserting customer data into a table with an XMLType column. There is currently no problem with inserting the data and as far as I can tell this data is not being truncated. However, when fetching this data I get the ORA-31167 error. It seems that when I execute the parser to fetch, using the extractvalue method to sort the result set based on nodes in the XMLType column.
    My solutions seem limited as I must present the data in a user defined order, I can not change the content of the XML and the customer will not be updating their version of oracle soon. Is there another way around this problem ?

  • ORA-31167: XML nodes over 64K in size cannot be inserted

    Hi there,
    we have just recently upgraded our database from 9i r2 to 10g (Oracle Database 10g Enterprise Edition Release 10.2.0.3.0).
    The following code was working fine in 9i but is now failing with the error listed in the subject of this thread. I am not actually inserting data at all but merely parsing it. Is there any way I can avoid this error while still performing the parse in PL/SQL?
    begin
    select test.b2c(xml) into xml_clob
    from sde.gdb_usermetadata, admin.sn_resource_metadata
    where id = rm_mdid
    and rm_rid = resource_id;
    v_parser := xmlparser.newParser;
    XMLParser.parseClob(v_parser,xml_clob);
    xml_doc := xmlparser.getDocument(v_parser);
    xmlparser.freeParser(v_parser);
    dbms_lob.freetemporary(xml_clob);
    end;
    The code actually fails at the line XMLParser.parseClob(v_parser,xml_clob);
    Many thanks,
    David
    Message was edited by:
    dverna

    Hi A_Non,
    many thanks for that. I'd already seen that posting and was just wondering if there was still any way to parse XML within a PL/SQL procedure rather than exporting a CLOB to a client or other server side program.
    Currently, the parse is being done to provide information to an ASP web application. Based on Mark's suggestion i'd have to export the clob to the ASP and perform the processing using the MSXML object. Not a huge inconvenience in this case but i'd prefer to have everything contained in the DB.
    I have other procedures that parse the same XML documents and load relational tables based on the data contained therein. As these are all scheduled to run overnight in Oracle i'd rather not have to rewrite the code in other languages when Oracle was handling it quite nicely in 9i (it's annoying because there is only 1 node >64k which I don't actually need anyway).
    Anyway, thanks for the pointer and if you or anyone else has further ideas they'd be much appreciated. I think an upgrade to 11g may be someway off!
    Cheers,
    David

  • Xml in JTree: how to not collpase JTree node, when renaming XML Node.

    Hi.
    I'm writing some kind of XML editor. I want to view my XML document in JTree and make user able to edit contents of XML. I made my own TreeModel for JTree, which straight accesses XML DOM, produced by Xerces. Using DOM Events, I made good-looking JTree updates without collapsing JTree on inserting or removing XML nodes.
    But there is a problem. I need to produce to user some method of renaming nodes. As I know, there is no way to rename node in w3c DOM. So I create new one with new name and copy all children and attributes to it. But in this way I got a new object of XML Node instead of renamed one. And I need to initiate rebuilding (treeStructureChanged event) of JTree structure. Renamed node collapses. If I use treeNodesChanged event (no rebuilding, just changes string view of JTree node), then when I try to operate with renamed node again, exception will be throwed.
    Is there some way to rename nodes in my program without collpasing JTree?
    I'am new to Java. Maybe there is a method in Xerces DOM implementation to rename nodes without recreating?
    Thanks in advance.

    I assume that "rename" means to change the element name? Anyway your question seems to be "When I add a node to a JTree, how do I make sure it is expanded?" This is completely concerned with Swing, so it might have been better to post it in the Swing forum, but if it were me I would do this:
    1. Copy the XML document into a JTree.
    2. Allow the user to edit the document. Don't attempt to keep an XML document or DOM synchronized with the contents of the JTree.
    3. On request of the user, copy the JTree back to a new XML document.
    This way you can "rename" things to the user's heart's content without having the problem you described.

  • Check whether there is nodes inside a xml node

    I am trying a few different way, but i can't get the point,
    hope some expert can help me on this.
    eg:
    <product>
    <item>
    </item>
    </product>
    <cfscript>
    <!--- after xml parse to xmlElement --->
    if (xmlElement.product.item neq ""){
    writeOutput(xmlElement.product.item[1]);
    But this wont work for me, anyone know how to check whether a
    xml node contains child nodes or not?

    xmlSearch()?
    Adam

  • ORA-31167: 64k size limit for XML node

    Hi,
    I have an application that archives XML documents provided by another organization. The other organization, a government regulatory body, controls the format and content of the documents. Many of the documents have large text nodes consisting of hundreds of kilobytes of CSV data.
    This application was developed against Oracle 9i and runs fine on that product. Testing against Oracle 10g, I get "ORA-31167: XML nodes over 64K in size cannot be inserted".
    As I read it, 64k is a fixed limit in Oracle10g. This limit did not seem to appear in Oracle9i however?
    What are my options for upgrading this application to Oracle10g? I can think of:
    1) Stay on 9i.
    2) Mess around with the XML content. This kind of compromises the purpose of the application, which is to archive the documents unchanged.
    3) Store the documents as CLOBs and forego the XML DB features.
    4) Abandon Oracle and use another XML database???!
    I've been really impressed with Oracle XML DB to date. I find this limitation quite hard to believe. I'm really hoping there is a simple alternative that I'm missing.
    Any ideas?
    John Hurst
    Wellington, New Zealand

    I inherited an application that was developed against Oracle 9.2.0.8, and which was recently upgraded to Oracle 10.2.0.3. I get "ORA-31167: XML nodes over 64K in size cannot be inserted" on about 5% of the documents, unfortunately they are the most important documents.
    Since the only data retrieval is with getCLOB(), I have attempted the xmlparse workaround xmlparse(DOCUMENT someCLOB WELLFORMED) yet still receive the ORA-31167 error.
    @ After more deugging, the getXMLFromFile() causes the error not the insert, while a getFileContent()successfully completes.
    Can you suggest another way to extract the values from the XML?
    Any chance of a 10g patch for this limit?
    Thanks,
    Procedure SQL:
    BEGIN
    freeCLOBOnExit := tempCLOB IS NULL;
    DBMS_LOB.createTemporary(tempCLOB, TRUE, DBMS_LOB.SESSION);
    xmlFileContent := xdb_utilities.getXMLFromFile(fileName, directoryName, tempCLOB=>tempCLOB);
    x_assetid := xmlFileContent.extract('/cds:document/cds:document-spec/cds:asset-id/text()', 'xmlns:cds="http://cds.central"').getStringVal();
    x_sourceid := xmlFileContent.extract('/cds:document/cds:document-spec/cds:source-id/text()', 'xmlns:cds="http://cds.central"').getStringVal();
    x_synopsis := xmlFileContent.extract('/cds:document/cds:document-spec/cds:synopsis/text()', 'xmlns:cds="http://cds.central"').getStringVal();
    x_date := xmlFileContent.extract('/cds:document/cds:document-spec/cds:update-date/text()', 'xmlns:cds="http://cds.central"').getStringVal();
    o_date := get_xml_date(x_date);
    x_audience := xmlFileContent.extract('/cds:document/cds:document-spec/cds:audience/text()', 'xmlns:cds="http://cds.central"').getStringVal();
    x_collection := xmlFileContent.extract('/cds:document/cds:document-spec/cds:collection-name/text()', 'xmlns:cds="http://cds.central"').getStringVal();
    DELETE from INFODOC where asset_id = x_assetid;
    INSERT INTO INFODOC VALUES( x_assetid, x_sourceid, x_synopsis, o_date, x_audience, x_collection, xmlparse(DOCUMENT tempCLOB WELLFORMED));
    COMMIT;
    IF (freeCLOBOnExit) THEN
    dbms_lob.freeTemporary(tempCLOB);
    ELSE
    dbms_lob.trim(tempCLOB, 0);
    END IF;
    END;
    Table DDL:
    CREATE TABLE "SYSTEM"."INFODOC"
    (     "ASSET_ID" VARCHAR2(35 BYTE),
         "SOURCE_ID" VARCHAR2(25 BYTE) NOT NULL ENABLE,
         "SYNOPSIS" VARCHAR2(256 BYTE) NOT NULL ENABLE,
         "UPDATE_DATE" DATE NOT NULL ENABLE,
         "AUDIENCE" VARCHAR2(15 BYTE) NOT NULL ENABLE,
         "COLLECTION_NAME" VARCHAR2(20 BYTE) NOT NULL ENABLE,
         "XMLDOC" "SYS"."XMLTYPE" NOT NULL ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "INFODOC"
    XMLTYPE COLUMN "XMLDOC" STORE AS CLOB (
    TABLESPACE "INFODOC" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
    NOCACHE LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) ;
    Message was edited by:
    dauza
    Message was edited by:
    dauza

  • Xs:group refs and "ORA-30936: Maximum number (1) of XML nodes exceeded'

    We registered a subset of the IBM DITA schemas in Oracle XDB. These schemas contain a lot of xs:group definitions where references to these groups contain "minOccurs" and "maxOccurs" atttributes, for instance:
    <xs:group name="category">
    <xs:sequence>
    <xs:element ref="category"/>
    </xs:sequence>
    </xs:group>
    <xs:complexType name="metadata.class">
    <xs:sequence>
    <xs:group ref="audience" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="category" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="keywords" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="prodinfo" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="othermeta" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="mapkeyref" type="xs:string"/>
    <xs:attributeGroup ref="global-atts"/>
    <xs:attribute ref="class" default="- topic/metadata "/>
    </xs:complexType>
    When we create an instance document that contains more than one "category" element under the element "metadata" element, like:
    <metadata>
    <audience type="purchaser" othertype="" job="using" otherjob="" experiencelevel="general"/>
    <category/>
    <category/>
    </metadata>
    we get the error: ORA-30936: Maximum number (1) of 'category' XML node elements exceeded
    This error is not consistent with the schema and XML parsers like Xerces and the Oracle "XDK parser" think the instance is fine.
    When we skip the reference to the group and reference the element definition "category" directly the problem is gone:
    <xs:complexType name="metadata.class">
    <xs:sequence>
    <xs:group ref="audience" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element ref="category" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="keywords" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="prodinfo" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="othermeta" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="mapkeyref" type="xs:string"/>
    <xs:attributeGroup ref="global-atts"/>
    <xs:attribute ref="class" default="- topic/metadata "/>
    </xs:complexType>
    In this case the problems for the other group references like "audience" remain.
    It looks like Oracle XDB doesn't honor the cardinality attributes "minOccurs" and "maxOccurs" on xs:group elements that are references. Does anyone experienced similar problems?
    Thanks,
    Maarten

    This sounds like bug 5204107. You'll need to open a tar with Oracle Support if you need a fix for this..
    It happens when a group is used once without a maxOccurs and then later with a maxOccurs.
    The workaround is 'in-line' the group before registering the XML Schema. This can be done as follows (assuming the group definition and reference are in the same XML Schema)..
    procedure expandGroup(xmlschema in out xmltype, groupName varchar2,xsdDirectory varchar2)
    is
      xsdSchemaPath varchar2(512);
      groupModel xmltype;
      sequenceModel xmlType := xmlType('<xsd:sequence ' || xdb_namespaces.XMLSCHEMA_PREFIX_XSD || '><xsd:sequence/></xsd:sequence>');
      maxOccursValue binary_integer;
    begin
      -- FInd the Group Definition
      if xmlSchema.existsNode('/xsd:schema//xsd:group[@ref="' || groupName || '"]',NAMESPACES) = 1 then
        if xmlSchema.existsNode('/xsd:schema/xsd:group[@name="' || groupName || '"]',NAMESPACES) = 1 then
          select extract
                   xmlSchema,
                   '/xsd:schema/xsd:group[@name="' || groupName || '"]',
                   NAMESPACES
            into groupModel
            from dual; 
        else
          dbms_output.put_line('xsdDirectory = ' || xsdDirectory);
          select PATH,
                 extract
                   CONTENTS,
                   '/xsd:schema/xsd:group[@name="' || groupName || '"]',
                   NAMESPACES
            into xsdSchemaPath, groupModel
            from (
                   select PATH, xdburitype(path).getXML() CONTENTS
                     from PATH_VIEW
                    where under_path(res,xsdDirectory) = 1
           where existsNode
                   CONTENTS,
                   '/xsd:schema/xsd:group[@name="' || groupName || '"]',
                   NAMESPACES
                 ) = 1;
           dbms_output.put_line('Resolved ' || groupModel.extract('/xsd:group/@name',NAMESPACES).getStringVal() || ' in Schema ' || xsdSchemaPath);
        end if;
        if groupModel.existsNode('/xsd:group/xsd:annotation',NAMESPACES) = 1 then
          select deleteXML
                   groupModel,
                   '/xsd:group/xsd:annotation',
                   NAMESPACES
            into groupModel
            from dual;
        end if;
        -- create a sequence that can be placed in-line in the XML Schema to replace the <group ref=""/>
        groupModel := groupModel.extract('/xsd:group/*',NAMESPACES);
        select updateXML
                 sequenceModel,
                 '/xsd:sequence/xsd:sequence',
                groupModel,
                 NAMESPACES
          into sequenceModel
          from dual;
        if xmlSchema.existsNode('/xsd:schema//xsd:group[@ref="' || groupName || '" and not(@maxOccurs)]',NAMESPACES) = 1 then
          select updateXML
                   xmlSchema,
                   '/xsd:schema//xsd:group[@ref="' || groupName || '" and not(@maxOccurs)]',
                  sequenceModel,
                   NAMESPACES
            into xmlSchema
            from dual;
        end if;
        select insertChildXML
                 sequenceModel,
                 '/xsd:sequence',
                 '@maxOccurs',
                 'unbounded',
                 NAMESPACES
          into sequenceModel
          from dual;
        if xmlSchema.existsNode('/xsd:schema//xsd:group[@ref="' || groupName || '" and @maxOccurs="unbounded"]',NAMESPACES) = 1 then
          select updateXML
                   xmlSchema,
                   '/xsd:schema//xsd:group[@ref="' || groupName || '" and @maxOccurs="unbounded"]',
                   sequenceModel,
                   NAMESPACES
            into xmlSchema
            from dual;
        end if;
        while xmlschema.existsNode('/xsd:schema//xsd:group[@ref="' || groupName || '"]',NAMESPACES) = 1 loop
          maxOccursValue := xmlSchema.extract('/xsd:schema//xsd:group[@ref="' || groupName || '"]/@maxOccurs').getNumberVal();
          select updateXML
                   sequenceModel,
                  '/xsd:sequence/@maxOccurs',
                   maxOccursValue,
                   NAMESPACES
            into sequenceModel
            from dual;
          select updateXML
                   xmlSchema,
                   '/xsd:schema//xsd:group[@ref="' || groupName || '" and @maxOccurs="' || maxOccursValue || '"]',
                   sequenceModel,
                   NAMESPACES
            into xmlSchema
            from dual;
        end loop;
      end if;
    end;
    --

  • 64k size limit for XML node

    HI,
    Is 64k still the limit size for an XML NODE in oracle 10g version.
    Thanks,

    You keep asking all these XML questions...
    Have you considered asking on the XML DB forum?
    XML DB
    That's usually the best place for XML issues.

  • Create a new Node in existing xml file using CL_IXML

    Friends i have to create a new node on existing file of xml. using CL_IXML class methods Append child .

    Hi,
       searching information of XML I find your post.
       Post my code source that I have (at the moment) but if you think something that changed , tell me please.
    TYPE-POOLS: ixml.
    * macros
    DEFINE write_xml.
      write: / 'XML:', &1 color col_positive inverse.
    END-OF-DEFINITION.
      TYPES: BEGIN OF xml_line,
              data(256) TYPE x,
             END OF xml_line.
    data: nom_archivo(50) TYPE c,
    g_arch_enviar(128) TYPE c.
    CONSTANTS: ENCODING(5) VALUE 'UTF-8'.
      DATA: l_ixml            TYPE REF TO if_ixml,
            l_streamfactory   TYPE REF TO if_ixml_stream_factory,
            l_parser type ref to if_ixml_parser,"""
            l_istream type ref to if_ixml_istream,"""
            l_ostream         TYPE REF TO if_ixml_ostream,
            l_renderer        TYPE REF TO if_ixml_renderer,
            l_document        TYPE REF TO if_ixml_document,
            l_node type ref to if_ixml_node,"""
            l_encoding type ref to if_ixml_encoding."""
      DATA: l_value                        TYPE string,"""""""""añado data
            l_var_xmldata type string,"""
            l_var_xmldata2 type string,"""
            l_var_xmldata3 type string,"""
            l_var_xmldata4 type string,"""
            l_var_cstr type xstring,"""
            l_var_ret type i,"""
            l_var_dsn type string."""
      DATA: l_xml_table       TYPE TABLE OF xml_line,
            l_xml_size        TYPE i,
            l_rc              TYPE i.
    *l_var_xmldata = '<?xml version="1.0" encoding="utf-8"?><C dr="ñ" "></C>'.
    l_var_xmldata2 = '<?xml version="1.0" encoding="utf-8"?>'.
    l_var_xmldata3 = '<elementFormDefault="qualified"'.
    l_var_xmldata4 = 'attributeFormDefault="unqualified""></C>'.
    *CONCATENATE l_var_xmldata2 '<elementFormDefault="qualified" "></C>' INTO l_var_xmldata.
    CONCATENATE l_var_xmldata2 l_var_xmldata3 l_var_xmldata4 INTO l_var_xmldata.
    nom_archivo = 'utf8.xml'.
    * Text-001 Ruta de unix a donde enviara el Archivo.
    CONCATENATE '/tmp/' nom_archivo INTO g_arch_enviar.
    CLASS cl_ixml DEFINITION LOAD.
      TYPES: c_line(50)    TYPE c.
    DATA:         xmltab        TYPE STANDARD TABLE OF c_line,
             node      TYPE REF TO if_ixml_node,
             xml_line       TYPE c_line,
             charset       TYPE string,
             success       TYPE c.
    DATA: BEGIN OF elemento1 occurs 0,
       name(30) VALUE 'Header',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento1.
    DATA: BEGIN OF elemento2 occurs 0,
       name(30) VALUE 'MasterFiles',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2.
    DATA: BEGIN OF elemento3 occurs 0,
       name(30) VALUE 'GeneralLedgerEntries',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3.
    DATA: BEGIN OF elemento4 occurs 0,
       name(30) VALUE 'SourceDocuments',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4.
    DATA: BEGIN OF elemento1A occurs 0,
       name(30) VALUE 'AuditFileVersion',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento1A.
    DATA: BEGIN OF elemento1B occurs 0,
       name(30) VALUE 'CompanyID',
       elemento1B1(30) VALUE 'ele1B1'.
    DATA END OF elemento1B.
    DATA: BEGIN OF elemento1C occurs 0,
       name(30) VALUE 'TaxRegistrationNumber',
       elemento1C1(30) VALUE 'ele1C1'.
    DATA END OF elemento1C.
    DATA: BEGIN OF elemento1D occurs 0,
       name(30) VALUE 'TaxAccountingBasis',
       elemento1D1(30) VALUE 'ele1D1'.
    DATA END OF elemento1D.
    DATA: BEGIN OF elemento1E occurs 0,
       name(30) VALUE 'CompanyName',
       elemento1E1(30) VALUE 'ele1E1'.
    DATA END OF elemento1E.
    DATA: BEGIN OF elemento1F occurs 0,
       name(30) VALUE 'CompanyAddress',
       elemento1F1(30) VALUE 'ele1F1'.
    DATA END OF elemento1F.
    DATA: BEGIN OF elemento1G occurs 0,
       name(30) VALUE 'FiscalYear',
       elemento1G1(30) VALUE 'ele1G1'.
    DATA END OF elemento1G.
    DATA: BEGIN OF elemento1H occurs 0,
       name(30) VALUE 'StartDate',
       elemento1H1(30) VALUE 'ele1H1'.
    DATA END OF elemento1H.
    DATA: BEGIN OF elemento1I occurs 0,
       name(30) VALUE 'EndDate',
       elemento1I1(30) VALUE 'ele1I1'.
    DATA END OF elemento1I.
    DATA: BEGIN OF elemento1J occurs 0,
       name(30) VALUE 'CurrencyCode',
       elemento1J1(30) VALUE 'ele1J1'.
    DATA END OF elemento1J.
    DATA: BEGIN OF elemento1K occurs 0,
       name(30) VALUE 'DateCreated',
       elemento1K1(30) VALUE 'ele1K1'.
    DATA END OF elemento1K.
    DATA: BEGIN OF elemento1L occurs 0,
       name(30) VALUE 'ProductID',
       elemento1L1(30) VALUE 'ele1L1'.
    DATA END OF elemento1L.
    DATA: BEGIN OF elemento1M occurs 0,
       name(30) VALUE 'ProductVersion',
       elemento1M1(30) VALUE 'ele1M1'.
    DATA END OF elemento1M.
    DATA: BEGIN OF elemento1N occurs 0,
       name(30) VALUE 'Telephone',
       elemento1N1(30) VALUE 'ele1N1'.
    DATA END OF elemento1N.
    DATA: BEGIN OF elemento1O occurs 0,
       name(30) VALUE 'Fax',
       elemento1O1(30) VALUE 'ele1O1'.
    DATA END OF elemento1O.
    DATA: BEGIN OF elemento1P occurs 0,
       name(30) VALUE 'Email',
       elemento1P1(30) VALUE 'ele1P1'.
    DATA END OF elemento1P.
    DATA: BEGIN OF elemento1Q occurs 0,
       name(30) VALUE 'WebSite',
       elemento1Q1(30) VALUE 'ele1Q1'.
    DATA END OF elemento1Q.
    DATA: BEGIN OF elemento1R occurs 0,
       name(30) VALUE 'HeaderComment',
       elemento1R1(30) VALUE 'ele1R1'.
    DATA END OF elemento1R.
    DATA: BEGIN OF elemento2A occurs 0,
       name(30) VALUE 'GeneralLedger',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2A.
    DATA: BEGIN OF elemento2B occurs 0,
       name(30) VALUE 'Customer',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B.
    DATA: BEGIN OF elemento2C occurs 0,
       name(30) VALUE 'Supplier',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C.
    DATA: BEGIN OF elemento2D occurs 0,
       name(30) VALUE 'Product',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2D.
    DATA: BEGIN OF elemento2E occurs 0,
       name(30) VALUE 'TaxTable',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E.
    DATA: BEGIN OF elemento2A1 occurs 0,
       name(30) VALUE 'AccountID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2A1.
    DATA: BEGIN OF elemento2A2 occurs 0,
       name(30) VALUE 'AccountDescription',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2A2.
    DATA: BEGIN OF elemento2B1 occurs 0,
       name(30) VALUE 'CustomerID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B1.
    DATA: BEGIN OF elemento2B2 occurs 0,
       name(30) VALUE 'CustomerTaxID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B2.
    DATA BEGIN OF elemento2B3 occurs 0.
    INCLUDE STRUCTURE elemento1E.
    *   name(30) VALUE 'CompanyName',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B3.
    DATA: BEGIN OF elemento2B4 occurs 0,
       name(30) VALUE 'Contact',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B4.
    DATA: BEGIN OF elemento2B5 occurs 0,
       name(30) VALUE 'BillingAddress',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B5.
    DATA: BEGIN OF elemento2B6 occurs 0,
       name(30) VALUE 'ShipToAddress',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B6.
    DATA: BEGIN OF elemento2B7 occurs 0.
    INCLUDE STRUCTURE elemento1N.
    *   name(30) VALUE 'Telephone',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B7.
    DATA: BEGIN OF elemento2B8 occurs 0.
    INCLUDE STRUCTURE elemento1O.
    *   name(30) VALUE 'Fax',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B8.
    DATA: BEGIN OF elemento2B9 occurs 0.
    INCLUDE STRUCTURE elemento1P.
    *   name(30) VALUE 'Email',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B9.
    DATA: BEGIN OF elemento2B10 occurs 0.
    INCLUDE STRUCTURE elemento1Q.
    *   name(30) VALUE 'Website',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B10.
    DATA: BEGIN OF elemento2C1 occurs 0,
       name(30) VALUE 'SupplierID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C1.
    DATA: BEGIN OF elemento2C2 occurs 0,
       name(30) VALUE 'SupplierTaxID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C2.
    DATA: BEGIN OF elemento2C3 occurs 0.
    INCLUDE STRUCTURE elemento1E.
    *   name(30) VALUE 'CompanyName',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C3.
    DATA: BEGIN OF elemento2C4 occurs 0.
    INCLUDE STRUCTURE elemento2B4.
    *   name(30) VALUE 'Contact',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C4.
    DATA: BEGIN OF elemento2C5 occurs 0.
    INCLUDE STRUCTURE elemento2B5.
    *   name(30) VALUE 'BillingAddress',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C5.
    DATA: BEGIN OF elemento2C6 occurs 0.
    INCLUDE STRUCTURE elemento2B6.
    *   name(30) VALUE 'ShipToAddress',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C6.
    DATA: BEGIN OF elemento2C7 occurs 0.
    INCLUDE STRUCTURE elemento1N.
    *   name(30) VALUE 'Telephone',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C7.
    DATA: BEGIN OF elemento2C8 occurs 0.
    INCLUDE STRUCTURE elemento1O.
    *   name(30) VALUE 'Fax',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C8.
    DATA: BEGIN OF elemento2C9 occurs 0.
    INCLUDE STRUCTURE elemento1P.
    *   name(30) VALUE 'Email',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C9.
    DATA: BEGIN OF elemento2C10 occurs 0.
    INCLUDE STRUCTURE elemento1Q.
    *   name(30) VALUE 'Website',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C10.
    DATA: BEGIN OF elemento2D1 occurs 0,
       name(30) VALUE 'ProductType',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2D1.
    DATA: BEGIN OF elemento2D2 occurs 0,
       name(30) VALUE 'ProductCode',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2D2.
    DATA: BEGIN OF elemento2D3 occurs 0,
       name(30) VALUE 'ProductGroup',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2D3.
    DATA: BEGIN OF elemento2D4 occurs 0,
       name(30) VALUE 'ProductDescription',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2D4.
    DATA: BEGIN OF elemento2D5 occurs 0,
       name(30) VALUE 'ProductNumberCode',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2D5.
    DATA: BEGIN OF elemento2E1 occurs 0,
       name(30) VALUE 'TaxType',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E1.
    DATA: BEGIN OF elemento2E1A occurs 0,
       name(30) VALUE 'Description',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E1A.
    DATA: BEGIN OF elemento2E1B occurs 0,
       name(30) VALUE 'TaxCodeDetails',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E1B.
    DATA: BEGIN OF elemento2E1B1 occurs 0,
       name(30) VALUE 'TaxCode',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E1B1.
    DATA: BEGIN OF elemento2E1B2 occurs 0.
    INCLUDE STRUCTURE elemento2E1A.
    *   name(30) VALUE 'Description',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E1B2.
    DATA: BEGIN OF elemento2E1B3 occurs 0,
       name(30) VALUE 'TaxPercentage',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E1B3.
    DATA: BEGIN OF elemento3A occurs 0,
       name(30) VALUE 'NumberOfEntries',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3A.
    DATA: BEGIN OF elemento3B occurs 0,
       name(30) VALUE 'TotalDebit',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3B.
    DATA: BEGIN OF elemento3C occurs 0,
       name(30) VALUE 'TotalCredit',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3C.
    DATA: BEGIN OF elemento3D occurs 0,
       name(30) VALUE 'Journal',
       minOccurs(30) VALUE '0',
       maxOccurs(30) VALUE 'unbounded',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D.
    DATA: BEGIN OF elemento3D1 occurs 0,
       name(30) VALUE 'JournalID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D1.
    DATA: BEGIN OF elemento3D2 occurs 0.
    INCLUDE STRUCTURE elemento2E1A.
    *   name(30) VALUE 'Description',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D2.
    DATA: BEGIN OF elemento3D3 occurs 0,
       name(30) VALUE 'Transaction',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3.
    DATA: BEGIN OF elemento3D3A occurs 0,
       name(30) VALUE 'TransactionID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3A.
    DATA: BEGIN OF elemento3D3B occurs 0,
       name(30) VALUE 'Period',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3B.
    DATA: BEGIN OF elemento3D3C occurs 0,
       name(30) VALUE 'TransactionDate',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3C.
    DATA: BEGIN OF elemento3D3D occurs 0,
       name(30) VALUE 'SourceID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3D.
    DATA: BEGIN OF elemento3D3E occurs 0.
    INCLUDE STRUCTURE elemento2E1A.
    *   name(30) VALUE 'Description',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3E.
    DATA: BEGIN OF elemento3D3F occurs 0,
    *INCLUDE STRUCTURE elemento2B1.
       name(30) VALUE 'GLPostingDate',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3F.
    DATA: BEGIN OF elemento3D3G occurs 0.
    INCLUDE STRUCTURE elemento2B1.
    *   name(30) VALUE 'CustomerID',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3G.
    DATA: BEGIN OF elemento3D3H occurs 0,
       name(30) VALUE 'SupplierID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3H.
    DATA: BEGIN OF elemento3D3I occurs 0,
       name(30) VALUE 'Line',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I.
    DATA: BEGIN OF elemento3D3I1 occurs 0,
       name(30) VALUE 'RecordID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I1.
    DATA: BEGIN OF elemento3D3I2 occurs 0.
    INCLUDE STRUCTURE elemento2A1.
    *   name(30) VALUE 'AccountID',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I2.
    DATA: BEGIN OF elemento3D3I3 occurs 0,
       name(30) VALUE 'SourceDocumentID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I3.
    DATA: BEGIN OF elemento3D3I4 occurs 0,
       name(30) VALUE 'SystemEntryDate',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I4.
    DATA: BEGIN OF elemento3D3I5 occurs 0.
    INCLUDE STRUCTURE elemento2E1A.
    *   name(30) VALUE 'Description',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I5.
    DATA: BEGIN OF elemento3D3I5A occurs 0,
       name(30) VALUE 'DebitAmount',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I5A.
    DATA: BEGIN OF elemento3D3I5B occurs 0,
       name(30) VALUE 'CreditAmount',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I5B.
    DATA: BEGIN OF elemento4A occurs 0,
       name(30) VALUE 'SalesInvoices',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A.
    DATA: BEGIN OF elemento4A1 occurs 0.
    INCLUDE STRUCTURE elemento3A.
    *   name(30) VALUE 'NumberOfEntries',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A1.
    DATA: BEGIN OF elemento4A2 occurs 0.
    INCLUDE STRUCTURE elemento3B.
    *   name(30) VALUE 'TotalDebit',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A2.
    DATA: BEGIN OF elemento4A3 occurs 0.
    INCLUDE STRUCTURE elemento3C.
    *   name(30) VALUE 'TotalCredit',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A3.
    DATA: BEGIN OF elemento4A4 occurs 0,
       name(30) VALUE 'Invoice',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4.
    DATA: BEGIN OF elemento4A4A occurs 0,
       name(30) VALUE 'InvoiceNo',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4A.
    DATA: BEGIN OF elemento4A4B occurs 0.
    INCLUDE STRUCTURE elemento3D3B.
    *   name(30) VALUE 'Period',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4B.
    DATA: BEGIN OF elemento4A4C occurs 0,
       name(30) VALUE 'InvoiceDate',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4C.
    DATA: BEGIN OF elemento4A4D occurs 0,
       name(30) VALUE 'InvoiceType',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4D.
    DATA: BEGIN OF elemento4A4E occurs 0.
    INCLUDE STRUCTURE elemento3D3I4.
    *   name(30) VALUE 'SystemEntryDate',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4E.
    DATA: BEGIN OF elemento4A4F occurs 0.
    INCLUDE STRUCTURE elemento3D3A.
    *   name(30) VALUE 'TransactionID',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4F.
    DATA: BEGIN OF elemento4A4G occurs 0.
    INCLUDE STRUCTURE elemento2B1.
    *   name(30) VALUE 'CustomerID',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4G.
    DATA: BEGIN OF elemento4A4H occurs 0,
       name(30) VALUE 'ShipTo',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4H.
    DATA: BEGIN OF elemento4A4I occurs 0,
       name(30) VALUE 'ShipFrom',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4I.
    DATA: BEGIN OF elemento4A4J occurs 0.
    INCLUDE STRUCTURE elemento3D3I.
    *   name(30) VALUE 'Line',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J.
    DATA: BEGIN OF elemento4A4K occurs 0,
       name(30) VALUE 'DocumentTotals',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K.
    DATA: BEGIN OF elemento4A4J1 occurs 0,
       name(30) VALUE 'LineNumber',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J1.
    DATA: BEGIN OF elemento4A4J2 occurs 0,
       name(30) VALUE 'OrderReferences',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J2.
    DATA: BEGIN OF elemento4A4J3 occurs 0,
       name(30) VALUE 'ProductCoder',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J3.
    DATA: BEGIN OF elemento4A4J4 occurs 0.
    INCLUDE STRUCTURE elemento2D4.
    *   name(30) VALUE 'ProductDescription',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J4.
    DATA: BEGIN OF elemento4A4J5 occurs 0,
       name(30) VALUE 'Quantity',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J5.
    DATA: BEGIN OF elemento4A4J6 occurs 0,
       name(30) VALUE 'UnitOfMeasure',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J6.
    DATA: BEGIN OF elemento4A4J7 occurs 0,
       name(30) VALUE 'UnitPrice',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J7.
    DATA: BEGIN OF elemento4A4J8 occurs 0,
       name(30) VALUE 'TaxPointDate',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J8.
    DATA: BEGIN OF elemento4A4J9 occurs 0,
       name(30) VALUE 'References',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J9.
    DATA: BEGIN OF elemento4A4J10 occurs 0.
    INCLUDE STRUCTURE elemento2E1A.
    *   name(30) VALUE 'Description',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J10.
    DATA: BEGIN OF elemento4A4J11 occurs 0.
    INCLUDE STRUCTURE elemento3D3I5A.
    *   name(30) VALUE 'DebitAmount',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J11.
    DATA: BEGIN OF elemento4A4J12 occurs 0.
    INCLUDE STRUCTURE elemento3D3I5B.
    *   name(30) VALUE 'CreditAmount',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J12.
    DATA: BEGIN OF elemento4A4J13 occurs 0,
       name(30) VALUE 'Tax',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J13.
    DATA: BEGIN OF elemento4A4J14 occurs 0,
       name(30) VALUE 'SettlementAmount',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J14.
    DATA: BEGIN OF elemento4A4J2A occurs 0,
       name(30) VALUE 'OriginatingON',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J2A.
    DATA: BEGIN OF elemento4A4J2B occurs 0,
       name(30) VALUE 'OrderDate',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J2B.
    DATA: BEGIN OF elemento4A4J9A occurs 0,
       name(30) VALUE 'CreditNote',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J9A.
    DATA: BEGIN OF elemento4A4J9A1 occurs 0,
       name(30) VALUE 'Reference',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J9A1.
    DATA: BEGIN OF elemento4A4J9A2 occurs 0,
       name(30) VALUE 'Reason',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J9A2.
    DATA: BEGIN OF elemento4A4K1 occurs 0,
       name(30) VALUE 'TaxPayable',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K1.
    DATA: BEGIN OF elemento4A4K2 occurs 0,
       name(30) VALUE 'NetTotal',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K2.
    DATA: BEGIN OF elemento4A4K3 occurs 0,
       name(30) VALUE 'GrossTotal',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K3.
    DATA: BEGIN OF elemento4A4K4 occurs 0,
       name(30) VALUE 'Currency',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K4.
    DATA: BEGIN OF elemento4A4K5 occurs 0,
       name(30) VALUE 'Settlement',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K5.
    DATA: BEGIN OF elemento4A4K4A occurs 0.
    INCLUDE STRUCTURE elemento1J.
    *   name(30) VALUE 'CurrencyCode',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K4A.
    DATA: BEGIN OF elemento4A4K4A1 occurs 0,
       name(30) VALUE 'CurrencyDebitAmount',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K4A1.
    DATA: BEGIN OF elemento4A4K4A2 occurs 0,
       name(30) VALUE 'CurrencyCreditAmount',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K4A2.
    START-OF-SELECTION.
    *       Creating a ixml factory
            l_ixml = cl_ixml=>create( ).
    * Create factory object for data streams
    l_streamfactory = l_ixml->create_stream_factory( ).
    * Create object for input stream
    l_istream = l_streamfactory->create_istream_string( string =
    l_var_xmldata ).
    *       Creating the dom object model
            l_document = l_ixml->create_document( ).
    * Create parser
    l_parser = l_ixml->create_parser( document = l_document
    stream_factory = l_streamfactory
    istream = l_istream ).
    * create dom tree by parsing
    if l_parser->parse( ) <> 0.
    data: j(2).
    j = '9'.
    * do exception handling here
    * return.
    endif.
    *create output objetct
    * create a output stream
      l_ostream = l_streamfactory->create_ostream_itable( table = xmltab ).
      charset = 'SAP*'.
      IF NOT charset IS INITIAL.
    *   set an document encoding (optional)
        l_encoding = l_ixml->create_encoding( character_set = charset
                                          byte_order = 0 ).
        success  = l_ostream->set_encoding( encoding = l_encoding ).
      ENDIF.
    l_renderer =
    l_ixml->create_renderer( document = l_document
    ostream = l_ostream ).
      IF l_renderer->render( ) <> 0.
        WRITE: / 'ERROR: document rendering'.
        EXIT.
      ENDIF.
    call method l_ostream->close( ).
    *Writing string to file
    open dataset g_arch_enviar FOR OUTPUT in binary mode.
    transfer l_var_cstr to g_arch_enviar.
    close dataset g_arch_enviar.
    *       Fill root node with value AuditFile
    DATA: l_element_AuditFile TYPE REF TO if_ixml_element.
            l_element_AuditFile  = l_document->create_simple_element(
                        name = 'AuditFile'
                        parent = l_document ).
    DATA: CONCA TYPE STRING.
    DATA: elemento type string.
    elemento = elemento1-name.
    DATA: l_element_Header TYPE REF TO if_ixml_element.
            l_element_Header  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_AuditFile ).
    elemento = elemento1A-name.
    DATA: l_element_AuditFileVersion TYPE REF TO if_ixml_element.
            l_element_AuditFileVersion  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1B-name.
    DATA: l_element_CompanyID TYPE REF TO if_ixml_element.
            l_element_CompanyID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    *The name "L_ELEMENT_TAXREGISTRATIONNUMBER" is longer than the allowed          
    *30 characters.          
    *elemento = elemento1C-name.
    *DATA: l_element_TaxRegistrationNumber TYPE REF TO if_ixml_element.
    *        l_element_TaxRegistrationNumber  = l_document->create_simple_element(
    *                    name = elemento
    *                    parent = l_element_Header ).
    elemento = elemento1D-name.
    DATA: l_element_TaxAccountingBasis TYPE REF TO if_ixml_element.
            l_element_TaxAccountingBasis  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1E-name.
    DATA: l_element_CompanyName TYPE REF TO if_ixml_element.
            l_element_CompanyName  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1F-name.
    DATA: l_element_CompanyAddress TYPE REF TO if_ixml_element.
            l_element_CompanyAddress  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1G-name.
    DATA: l_element_FiscalYear TYPE REF TO if_ixml_element.
            l_element_FiscalYear  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1H-name.
    DATA: l_element_StartDate TYPE REF TO if_ixml_element.
            l_element_StartDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1I-name.
    DATA: l_element_EndDate TYPE REF TO if_ixml_element.
            l_element_EndDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1J-name.
    DATA: l_element_CurrencyCode TYPE REF TO if_ixml_element.
            l_element_CurrencyCode  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1K-name.
    DATA: l_element_DateCreated TYPE REF TO if_ixml_element.
            l_element_DateCreated  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1L-name.
    DATA: l_element_ProductID TYPE REF TO if_ixml_element.
            l_element_ProductID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1M-name.
    DATA: l_element_ProductVersion TYPE REF TO if_ixml_element.
            l_element_ProductVersion  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1N-name.
    DATA: l_element_Telephone TYPE REF TO if_ixml_element.
            l_element_Telephone  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1O-name.
    DATA: l_element_Fax TYPE REF TO if_ixml_element.
            l_element_Fax  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1P-name.
    DATA: l_element_Email TYPE REF TO if_ixml_element.
            l_element_Email  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1Q-name.
    DATA: l_element_WebSite TYPE REF TO if_ixml_element.
            l_element_WebSite  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1R-name.
    DATA: l_element_HeaderComment TYPE REF TO if_ixml_element.
            l_element_HeaderComment  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento2-name.
    DATA: l_element_MasterFiles TYPE REF TO if_ixml_element.
            l_element_MasterFiles  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_AuditFile ).
    elemento = elemento2A-name.
    DATA: l_element_GeneralLedger TYPE REF TO if_ixml_element.
            l_element_GeneralLedger  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_MasterFiles ).
    elemento = elemento2B-name.
    DATA: l_element_Customer TYPE REF TO if_ixml_element.
            l_element_Customer  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_MasterFiles ).
    elemento = elemento2C-name.
    DATA: l_element_Supplier TYPE REF TO if_ixml_element.
            l_element_Supplier  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_MasterFiles ).
    elemento = elemento2D-name.
    DATA: l_element_Product TYPE REF TO if_ixml_element.
            l_element_Product  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_MasterFiles ).
    elemento = elemento2E-name.
    DATA: l_element_TaxTable TYPE REF TO if_ixml_element.
            l_element_TaxTable  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_MasterFiles ).
    elemento = elemento2A1-name.
    DATA: l_element_AccountID TYPE REF TO if_ixml_element.
            l_element_AccountID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_GeneralLedger ).
    elemento = elemento2A2-name.
    DATA: l_element_AccountDescription TYPE REF TO if_ixml_element.
            l_element_AccountDescription  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_GeneralLedger ).
    elemento = elemento2B1-name.
    DATA: l_element_CustomerID TYPE REF TO if_ixml_element.
            l_element_CustomerID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    elemento = elemento2B2-name.
    DATA: l_element_CustomerTaxID TYPE REF TO if_ixml_element.
            l_element_CustomerTaxID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    *elemento = elemento2B3-name.
    elemento = elemento1E-name.
    *DATA: l_element_CompanyName TYPE REF TO if_ixml_element.
            l_element_CompanyName  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    elemento = elemento2B4-name.
    DATA: l_element_Contact TYPE REF TO if_ixml_element.
            l_element_Contact  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    elemento = elemento2B5-name.
    DATA: l_element_BillingAddress TYPE REF TO if_ixml_element.
            l_element_BillingAddress  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    elemento = elemento2B6-name.
    DATA: l_element_ShipToAddress TYPE REF TO if_ixml_element.
            l_element_ShipToAddress  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    *elemento = elemento2B7-name.
    elemento = elemento1N-name.
    *DATA: l_element_Telephone TYPE REF TO if_ixml_element.
            l_element_Telephone  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    *elemento = elemento2B8-name.
    elemento = elemento1O-name.
    *DATA: l_element_Fax TYPE REF TO if_ixml_element.
            l_element_Fax  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    *elemento = elemento2B9-name.
    elemento = elemento1P-name.
    *DATA: l_element_Email TYPE REF TO if_ixml_element.
            l_element_Email  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    *elemento = elemento2B10-name.
    elemento = elemento1Q-name.
    *DATA: l_element_Website TYPE REF TO if_ixml_element.
            l_element_Website  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    elemento = elemento2C1-name.
    DATA: l_element_SupplierID TYPE REF TO if_ixml_element.
            l_element_SupplierID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento2C2-name.
    DATA: l_element_SupplierTaxID TYPE REF TO if_ixml_element.
            l_element_SupplierTaxID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento1E-name.
    *DATA: l_element_CompanyName TYPE REF TO if_ixml_element.
            l_element_CompanyName  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento2B4-name.
    *DATA: l_element_Contact TYPE REF TO if_ixml_element.
            l_element_Contact  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento2B5-name.
    *DATA: l_element_BillingAddress TYPE REF TO if_ixml_element.
            l_element_BillingAddress  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento2B6-name.
    *DATA: l_element_ShipToAddress TYPE REF TO if_ixml_element.
            l_element_ShipToAddress  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento1N-name.
    *DATA: l_element_Telephone TYPE REF TO if_ixml_element.
            l_element_Telephone  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento1O-name.
    *DATA: l_element_Fax TYPE REF TO if_ixml_element.
            l_element_Fax  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento1P-name.
    *DATA: l_element_Email TYPE REF TO if_ixml_element.
            l_element_Email  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento1Q-name.
    *DATA: l_element_Website TYPE REF TO if_ixml_element.
            l_element_Website  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento2D1-name.
    DATA: l_element_ProductType TYPE REF TO if_ixml_element.
            l_element_ProductType  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Product ).
    elemento = elemento2D2-name.
    DATA: l_element_ProductCode TYPE REF TO if_ixml_element.
            l_element_ProductCode  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Product ).
    elemento = elemento2D3-name.
    DATA: l_element_ProductGroup TYPE REF TO if_ixml_element.
            l_element_ProductGroup  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Product ).
    elemento = elemento2D4-name.
    DATA: l_element_ProductDescription TYPE REF TO if_ixml_element.
            l_element_ProductDescription  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Product ).
    elemento = elemento2D5-name.
    DATA: l_element_ProductNumberCode TYPE REF TO if_ixml_element.
            l_element_ProductNumberCode  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Product ).
    elemento = elemento2E1-name.
    DATA: l_element_TaxType TYPE REF TO if_ixml_element.
            l_element_TaxType  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_TaxTable ).
    elemento = elemento2E1A-name.
    DATA: l_element_Description TYPE REF TO if_ixml_element.
            l_element_Description  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_TaxType ).
    elemento = elemento2E1B-name.
    DATA: l_element_TaxCodeDetails TYPE REF TO if_ixml_element.
            l_element_TaxCodeDetails  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_TaxType ).
    elemento = elemento2E1B1-name.
    DATA: l_element_TaxCode TYPE REF TO if_ixml_element.
            l_element_TaxCode  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_TaxCodeDetails ).
    elemento = elemento2E1A-name.
    *DATA: l_element_Description TYPE REF TO if_ixml_element.
            l_element_Description  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_TaxCodeDetails ).
    elemento = elemento2E1B3-name.
    DATA: l_element_TaxPercentage TYPE REF TO if_ixml_element.
            l_element_TaxPercentage  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_TaxCodeDetails ).
    elemento = elemento3-name.
    DATA: l_element_GeneralLedgerEntries TYPE REF TO if_ixml_element.
            l_element_GeneralLedgerEntries  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_AuditFile ).
    elemento = elemento3A-name.
    DATA: l_element_NumberOfEntries TYPE REF TO if_ixml_element.
            l_element_NumberOfEntries  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_GeneralLedgerEntries ).
    elemento = elemento3B-name.
    DATA: l_element_TotalDebit TYPE REF TO if_ixml_element.
            l_element_TotalDebit  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_GeneralLedgerEntries ).
    elemento = elemento3C-name.
    DATA: l_element_TotalCredit TYPE REF TO if_ixml_element.
            l_element_TotalCredit  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_GeneralLedgerEntries ).
    elemento = elemento3D-name.
    *****if elemento3D-minOccurs NE ''.
    *****   elemento1 = ' minOccurs = '.
    *****   elemento2 = elemento3D-minOccurs.
    *****   CONCATENATE elemento elemento1 elemento2 INTO elemento.
    *****endif.
    *data: eleref(30),
    *elemento.
    *eleref = 'ref = '.
    *CONCATENATE eleref elemento INTO elemento.
    DATA: l_element_Journal TYPE REF TO if_ixml_element.
            l_element_Journal  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_GeneralLedgerEntries ).
    elemento = elemento3D1-name.
    DATA: l_element_JournalID TYPE REF TO if_ixml_element.
            l_element_JournalID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Journal ).
    elemento = elemento2E1A-name.
    *DATA: l_element_Description TYPE REF TO if_ixml_element.
            l_element_Description  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Journal ).
    elemento = elemento3D3-name.
    DATA: l_element_Transaction TYPE REF TO if_ixml_element.
            l_element_Transaction  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Journal ).
    elemento = elemento3D3A-name.
    DATA: l_element_TransactionID TYPE REF TO if_ixml_element.
            l_element_TransactionID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento3D3B-name.
    DATA: l_element_Period TYPE REF TO if_ixml_element.
            l_element_Period  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento3D3C-name.
    DATA: l_element_TransactionDate TYPE REF TO if_ixml_element.
            l_element_TransactionDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento3D3D-name.
    DATA: l_element_SourceID TYPE REF TO if_ixml_element.
            l_element_SourceID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento2E1A-name.
    *DATA: l_element_Description TYPE REF TO if_ixml_element.
            l_element_Description  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento3D3F-name.
    DATA: l_element_GLPostingDate TYPE REF TO if_ixml_element.
            l_element_GLPostingDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento2B1-name.
    *DATA: l_element_CustomerID TYPE REF TO if_ixml_element.
            l_element_CustomerID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento2C1-name.
    *DATA: l_element_SupplierID TYPE REF TO if_ixml_element.
            l_element_SupplierID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento3D3I-name.
    DATA: l_element_Line TYPE REF TO if_ixml_element.
            l_element_Line  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento3D3I1-name.
    DATA: l_element_RecordID TYPE REF TO if_ixml_element.
            l_element_RecordID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento2A1-name.
    *DATA: l_element_AccountID TYPE REF TO if_ixml_element.
            l_element_AccountID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento3D3I3-name.
    DATA: l_element_SourceDocumentID TYPE REF TO if_ixml_element.
            l_element_SourceDocumentID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento3D3I4-name.
    DATA: l_element_SystemEntryDate TYPE REF TO if_ixml_element.
            l_element_SystemEntryDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento2E1A-name.
    *DATA: l_element_Description TYPE REF TO if_ixml_element.
            l_element_Description  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento3D3I5A-name.
    DATA: l_element_DebitAmount TYPE REF TO if_ixml_element.
            l_element_DebitAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Description ).
    elemento = elemento3D3I5B-name.
    DATA: l_element_CreditAmount TYPE REF TO if_ixml_element.
            l_element_CreditAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Description ).
    elemento = elemento4-name.
    DATA: l_element_SourceDocuments TYPE REF TO if_ixml_element.
            l_element_SourceDocuments  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_AuditFile ).
    elemento = elemento4A-name.
    DATA: l_element_SalesInvoices TYPE REF TO if_ixml_element.
            l_element_SalesInvoices  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_SourceDocuments ).
    elemento = elemento3A-name.
    *DATA: l_element_NumberOfEntries TYPE REF TO if_ixml_element.
            l_element_NumberOfEntries  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_SalesInvoices ).
    elemento = elemento3B-name.
    *DATA: l_element_TotalDebit TYPE REF TO if_ixml_element.
            l_element_TotalDebit  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_SalesInvoices ).
    elemento = elemento3C-name.
    *DATA: l_element_TotalCredit TYPE REF TO if_ixml_element.
            l_element_TotalCredit  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_SalesInvoices ).
    elemento = elemento4A4-name.
    DATA: l_element_Invoice TYPE REF TO if_ixml_element.
            l_element_Invoice  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_SalesInvoices ).
    elemento = elemento4A4A-name.
    DATA: l_element_InvoiceNo TYPE REF TO if_ixml_element.
            l_element_InvoiceNo  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento3D3B-name.
    *DATA: l_element_Period TYPE REF TO if_ixml_element.
            l_element_Period  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento4A4C-name.
    DATA: l_element_InvoiceDate TYPE REF TO if_ixml_element.
            l_element_InvoiceDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento4A4D-name.
    DATA: l_element_InvoiceType TYPE REF TO if_ixml_element.
            l_element_InvoiceType  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento3D3I4-name.
    *DATA: l_element_SystemEntryDate TYPE REF TO if_ixml_element.
            l_element_SystemEntryDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento3D3A-name.
    *DATA: l_element_TransactionID TYPE REF TO if_ixml_element.
            l_element_TransactionID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento2B1-name.
    *DATA: l_element_CustomerID TYPE REF TO if_ixml_element.
            l_element_CustomerID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento4A4H-name.
    DATA: l_element_ShipTo TYPE REF TO if_ixml_element.
            l_element_ShipTo  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento4A4I-name.
    DATA: l_element_ShipFrom TYPE REF TO if_ixml_element.
            l_element_ShipFrom  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento3D3I-name.
    *DATA: l_element_Line TYPE REF TO if_ixml_element.
            l_element_Line  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento4A4K-name.
    DATA: l_element_DocumentTotals TYPE REF TO if_ixml_element.
            l_element_DocumentTotals  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento4A4J1-name.
    DATA: l_element_LineNumber TYPE REF TO if_ixml_element.
            l_element_LineNumber  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J2-name.
    DATA: l_element_OrderReferences TYPE REF TO if_ixml_element.
            l_element_OrderReferences  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J3-name.
    DATA: l_element_ProductCoder TYPE REF TO if_ixml_element.
            l_element_ProductCode  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento2D4-name.
    *DATA: l_element_ProductDescription TYPE REF TO if_ixml_element.
            l_element_ProductDescription  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J5-name.
    DATA: l_element_Quantity TYPE REF TO if_ixml_element.
            l_element_Quantity  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J6-name.
    DATA: l_element_UnitOfMeasure TYPE REF TO if_ixml_element.
            l_element_UnitOfMeasure  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J7-name.
    DATA: l_element_UnitPrice TYPE REF TO if_ixml_element.
            l_element_UnitPrice  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J8-name.
    DATA: l_element_TaxPointDate TYPE REF TO if_ixml_element.
            l_element_TaxPointDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J9-name.
    DATA: l_element_References TYPE REF TO if_ixml_element.
            l_element_References  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento2E1A-name.
    *DATA: l_element_Description TYPE REF TO if_ixml_element.
            l_element_Description  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento3D3I5A-name.
    *DATA: l_element_DebitAmount TYPE REF TO if_ixml_element.
            l_element_DebitAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento3D3I5B-name.
    *DATA: l_element_CreditAmount TYPE REF TO if_ixml_element.
            l_element_CreditAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J13-name.
    DATA: l_element_Tax TYPE REF TO if_ixml_element.
            l_element_Tax  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J14-name.
    DATA: l_element_SettlementAmount TYPE REF TO if_ixml_element.
            l_element_SettlementAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J2A-name.
    DATA: l_element_OriginatingON TYPE REF TO if_ixml_element.
            l_element_OriginatingON  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_OrderReferences ).
    elemento = elemento4A4J2B-name.
    DATA: l_element_OrderDate TYPE REF TO if_ixml_element.
            l_element_OrderDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_OrderReferences ).
    elemento = elemento4A4J9A-name.
    DATA: l_element_CreditNote TYPE REF TO if_ixml_element.
            l_element_CreditNote  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_References ).
    elemento = elemento4A4J9A1-name.
    DATA: l_element_Reference TYPE REF TO if_ixml_element.
            l_element_Reference  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_CreditNote ).
    elemento = elemento4A4J9A2-name.
    DATA: l_element_Reason TYPE REF TO if_ixml_element.
            l_element_Reason  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_CreditNote ).
    elemento = elemento4A4K1-name.
    DATA: l_element_TaxPayable TYPE REF TO if_ixml_element.
            l_element_TaxPayable  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_DocumentTotals ).
    elemento = elemento4A4K2-name.
    DATA: l_element_NetTotal TYPE REF TO if_ixml_element.
            l_element_NetTotal  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_DocumentTotals ).
    elemento = elemento4A4K3-name.
    DATA: l_element_GrossTotal TYPE REF TO if_ixml_element.
            l_element_GrossTotal  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_DocumentTotals ).
    elemento = elemento4A4K4-name.
    DATA: l_element_Currency TYPE REF TO if_ixml_element.
            l_element_Currency  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_DocumentTotals ).
    elemento = elemento4A4K5-name.
    DATA: l_element_Settlement TYPE REF TO if_ixml_element.
            l_element_Settlement  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_DocumentTotals ).
    elemento = elemento1J-name.
    *DATA: l_element_CurrencyCode TYPE REF TO if_ixml_element.
            l_element_CurrencyCode  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Currency ).
    elemento = elemento4A4K4A1-name.
    DATA: l_element_CurrencyDebitAmount TYPE REF TO if_ixml_element.
            l_element_CurrencyDebitAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_CurrencyCode ).
    elemento = elemento4A4K4A2-name.
    DATA: l_element_CurrencyCreditAmount TYPE REF TO if_ixml_element.
            l_element_CurrencyCreditAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_CurrencyCode ).
    *   Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
    *   Connect internal XML table to stream factory
        l_ostream = l_streamfactory->create_ostream_itable( table = l_xml_table ).
    *   Rendering the document
        l_renderer = l_ixml->create_renderer( ostream  = l_ostream
                                              document = l_document ).
        l_rc = l_renderer->render( ).
    *   Saving the XML document
        l_xml_size = l_ostream->get_num_written_raw( ).
        CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            bin_filesize = l_xml_size
    *        filename     = 'E:     empAuditFile2.xml'                  "cambio E
            filename     = 'C:mioAuditFile21.xml'                  "cambio C
            filetype     = 'BIN'
          CHANGING
            data_tab     = l_xml_table
          EXCEPTIONS
            OTHERS       = 24.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    *inicio prueba
    *Process the document
    perform process_dom using l_document.
    *WHEN
    *fin prueba
    **& Form process_dom
    form process_dom using document type ref to if_ixml_document.
    data: node type ref to if_ixml_node,
    iterator type ref to if_ixml_node_iterator,
    nodemap type ref to if_ixml_named_node_map,
    attr type ref to if_ixml_node,
    name type string,
    prefix type string,
    value type string,
    indent type i,
    count type i,
    index type i.
    data: name2 type string,
    name_root type string,
    node_parent type ref to if_ixml_node,
    node_root type ref to if_ixml_node,
    num_children type i.
    node ?= document.
    check not node is initial.
    uline.
    write: /.
    write: /' DOM-TREE'.
    write: /.
    if node is initial. exit. endif.
    *create a node iterator
    iterator = node->create_iterator( ).
    *get current node
    node = iterator->get_next( ).
    *loop over all nodes
    while not node is initial.
    indent = node->get_height( ) * 2.
    indent = indent + 20.
    num_children = node->num_children( ).
    case node->get_type( ).
    when if_ixml_node=>co_node_element.
    *element node
    name = node->get_name( ).
    nodemap = node->get_attributes( ).
    node_root = node->get_root( ).
    name_root = node_root->get_name( ).
    write: / 'ELEMENT :'.
    write: at indent name color col_positive inverse.
    write: 'NUM_CHILDREN:', num_children.
    write: 'ROOT:', name_root.
    node_parent = node->get_parent( ).
    name2 = node_parent->get_name( ).
    write: 'NAME2: ' , name2.
    if not nodemap is initial.
    *attributes
    count = nodemap->get_length( ).
    do count times.
    index = sy-index - 1.
    attr = nodemap->get_item( index ).
    name = attr->get_name( ).
    prefix = attr->get_namespace_prefix( ).
    value = attr->get_value( ).
    write: / 'ATTRIBUTE:'.
    write: at indent name color col_heading inverse, '=',
    value color col_total inverse.
    enddo.
    endif.
    when if_ixml_node=>co_node_text or
    if_ixml_node=>co_node_cdata_section.
    *text node
    value = node->get_value( ).
    write: / 'VALUE :'.
    *mjprocha
    node_parent = node->get_parent( ).
    write: at indent value color col_group inverse.
    name2 = node_parent->get_name( ).
    write: 'NAME2: ' , name2.
    endcase.
    *advance to next node
    node = iterator->get_next( ).
    endwhile.
    endform. "process_dom
    *       FORM print_tree                                               *
    FORM print_dom USING node TYPE REF TO if_ixml_node.
      DATA: iterator  TYPE REF TO if_ixml_node_iterator,
            nodemap   TYPE REF TO if_ixml_named_node_map,
            attr      TYPE REF TO if_ixml_node,
            name      TYPE string,
            prefix    TYPE string,
            value     TYPE string,
            indent    TYPE i,
            count     TYPE i,
            index     TYPE i.
      CHECK NOT node IS INITIAL.
      ULINE.
      WRITE: /.
      WRITE: /' DOM-TREE'.
      WRITE: /.
      IF node IS INITIAL. EXIT. ENDIF.
    * create a node iterator
      iterator  = node->create_iterator( ).
    * get current node
      node = iterator->get_next( ).
    * loop over all nodes
      WHILE NOT node IS INITIAL.
        indent = node->get_height( ) * 2.
        indent = indent + 20.
        CASE node->get_type( ).
          WHEN if_ixml_node=>co_node_eleme

  • Error - convert single node-RAC-ConvertTomydb.xml -

    my single node init.ora file:
    # Copyright (c) 1991, 2001, 2002 by Oracle Corporation
    # Cache and I/O
    db_block_size=8192
    db_file_multiblock_read_count=16
    # Cursors and Library Cache
    open_cursors=300
    # Database Identification
    db_domain=""
    db_name=mydb
    # Diagnostics and Statistics
    background_dump_dest=/u01/app/oracle/admin/mydb/bdump
    core_dump_dest=/u01/app/oracle/admin/mydb/cdump
    user_dump_dest=/u01/app/oracle/admin/mydb/udump
    # File Configuration
    control_files=("/u01/app/oracle/oradata/mydb/control01.ctl", "/u01/app/oracle/oradata/mydb/control02.ctl", "/u01/app/oracle/oradata/mydb/control03.ctl")
    # Job Queues
    job_queue_processes=10
    # Miscellaneous
    compatible=10.2.0.1.0
    # Processes and Sessions
    processes=150
    # SGA Memory
    sga_target=1083179008
    # Security and Auditing
    audit_file_dest=/u01/app/oracle/admin/mydb/adump
    remote_login_passwordfile=EXCLUSIVE
    # Shared Server
    dispatchers="(PROTOCOL=TCP) (SERVICE=mydbXDB)"
    # Sort, Hash Joins, Bitmap Indexes
    pga_aggregate_target=360710144
    # System Managed Undo and Rollback Segments
    undo_management=AUTO
    undo_tablespace=UNDOTBS1
    my ConvertTomydb.xml ------------which is copy of ConvertToRAC.xml file
    <?xml version="1.0" encoding="UTF-8" ?>
    - <n:RConfig xmlns:n="http://www.oracle.com/rconfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/rconfig">
    - <n:ConvertToRAC>
    - <!-- Verify does a precheck to ensure all pre-requisites are met, before the conversion is attempted. Allowable values are: YES|NO|ONLY
    -->
    - <n:Convert verify="ONLY">
    - <!-- Specify current OracleHome of non-rac database for SourceDBHome
    -->
    <n:SourceDBHome>/u01/app/oracle/product/10.2.0/db_1</n:SourceDBHome>
    - <!-- Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome
    -->
    <n:TargetDBHome>/u01/app/oracle/product/10.2.0/db_1</n:TargetDBHome>
    - <!-- Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion
    -->
    - <n:SourceDBInfo SID="mydb">
    - <n:Credentials>
    <n:User>sys</n:User>
    <n:Password>oracle</n:Password>
    <n:Role>sysdba</n:Role>
    </n:Credentials>
    </n:SourceDBInfo>
    - <!-- ASMInfo element is required only if the current non-rac database uses ASM Storage
    -->
    - <n:ASMInfo SID="+ASM1">
    - <n:Credentials>
    <n:User>sys</n:User>
    <n:Password>oracle</n:Password>
    <n:Role>sysdba</n:Role>
    </n:Credentials>
    </n:ASMInfo>
    - <!-- Specify the list of nodes that should have rac instances running. LocalNode should be the first node in this nodelist.
    -->
    - <n:NodeList>
    <n:Node name="linux1" />
    <n:Node name="linux2" />
    </n:NodeList>
    - <!-- Specify prefix for rac instances. It can be same as the instance name for non-rac database or different. The instance number will be attached to this prefix.
    -->
    <n:InstancePrefix>mydb</n:InstancePrefix>
    - <!-- Specify port for the listener to be configured for rac database.If port="", alistener existing on localhost will be used for rac database.The listener will be extended to all nodes in the nodelist
    -->
    <n:Listener port="1521" />
    - <!-- Specify the type of storage to be used by rac database. Allowable values are CFS|ASM. The non-rac database should have same storage type.
    -->
    - <n:SharedStorage type="ASM">
    - <!-- Specify Database Area Location to be configured for rac database.If this field is left empty, current storage will be used for rac database. For CFS, this field will have directory path.
    -->
    <n:TargetDatabaseArea>+ORCL_DATA1</n:TargetDatabaseArea>
    - <!-- Specify Flash Recovery Area to be configured for rac database. If this field is left empty, current recovery area of non-rac database will be configured for rac database. If current database is not using recovery Area, the resulting rac database will not have a recovery area.
    -->
    <n:TargetFlashRecoveryArea>+FLASH_RECOVERY_AREA</n:TargetFlashRecoveryArea>
    </n:SharedStorage>
    </n:Convert>
    </n:ConvertToRAC>
    </n:RConfig>
    Ran the xml file
    $ rconfig ConvertTomydb.xml
    Got this below error.
    [oracle@linux1 bin]$ sh rconfig ConvertTomydb.xml
    <?xml version="1.0" ?>
    <RConfig>
    <ConvertToRAC>
    <Convert>
    <Response>
    <Result code="1" >
    Operation Failed
    </Result>
    <ErrorDetails>
    Clusterware is not configured
    </ErrorDetails>
    </Response>
    </Convert>
    </ConvertToRAC></RConfig>
    [oracle@linux1 bin]$
    Log file from /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/rconfig/rconfig.log
    [main] [0:14:4:4] [RuntimeExec.runCommand:175] Returning from RunTimeExec.runCommand
    oracle.ops.mgmt.cluster.RemoteShellException: PRKC-1044 : Failed to check remote command execution setup for node linux2 using shells /usr/bin/ssh and /usr/bin/rsh
    linux2.com: Connection refused
         at oracle.ops.mgmt.nativesystem.UnixSystem.checkRemoteExecutionSetup(UnixSystem.java:1880)
         at oracle.ops.mgmt.nativesystem.UnixSystem.getRemoteShellCmd(UnixSystem.java:1634)
         at oracle.ops.mgmt.nativesystem.UnixSystem.createCommand(UnixSystem.java:614)
         at oracle.ops.mgmt.nativesystem.UnixSystem.removeFile(UnixSystem.java:622)
         at oracle.ops.mgmt.nativesystem.UnixSystem.isSharedPath(UnixSystem.java:1352)
         at oracle.ops.mgmt.cluster.Cluster.isSharedPath(Cluster.java:916)
         at oracle.ops.mgmt.cluster.Cluster.isSharedPath(Cluster.java:859)
         at oracle.sysman.assistants.util.ClusterUtils.areSharedPaths(ClusterUtils.java:570)
         at oracle.sysman.assistants.util.ClusterUtils.isShared(ClusterUtils.java:501)
         at oracle.sysman.assistants.util.ClusterUtils.isShared(ClusterUtils.java:457)
         at oracle.sysman.assistants.util.attributes.CommonOPSAttributes.updateShared(CommonOPSAttributes.java:724)
         at oracle.sysman.assistants.util.attributes.CommonOPSAttributes.setNodeNames(CommonOPSAttributes.java:207)
         at oracle.sysman.assistants.rconfig.engine.Context.<init>(Context.java:54)
         at oracle.sysman.assistants.rconfig.engine.ASMInstance.createUtilASMInstanceRAC(ASMInstance.java:109)
         at oracle.sysman.assistants.rconfig.engine.Step.execute(Step.java:245)
         at oracle.sysman.assistants.rconfig.engine.Request.execute(Request.java:73)
         at oracle.sysman.assistants.rconfig.engine.RConfigEngine.execute(RConfigEngine.java:65)
         at oracle.sysman.assistants.rconfig.RConfig.<init>(RConfig.java:85)
         at oracle.sysman.assistants.rconfig.RConfig.<init>(RConfig.java:51)
         at oracle.sysman.assistants.rconfig.RConfig.main(RConfig.java:130)
    [main] [0:14:4:16] [UnixSystem.isSharedPath:1356] UnixSystem.isShared: creating file /u01/app/oracle/product/10.2.0/db_1/CFSFileName126249561289258204.tmp
    [main] [0:14:4:17] [UnixSystem.checkRemoteExecutionSetup:1817] checkRemoteExecutionSetup:: Checking user equivalence using Secured Shell '/usr/bin/ssh'
    [main] [0:14:4:17] [UnixSystem.checkRemoteExecutionSetup:1819] checkRemoteExecutionSetup:: Running Unix command: /usr/bin/ssh -o FallBackToRsh=no -o PasswordAuthentication=no -o StrictHostKeyChecking=yes -o NumberOfPasswordPrompts=0 linux2 /bin/true
    oracle.ops.mgmt.cluster.SharedDeviceException: PRKC-1044 : Failed to check remote command execution setup for node linux2 using shells /usr/bin/ssh and /usr/bin/rsh
    linux2.com: Connection refused
         at oracle.ops.mgmt.nativesystem.UnixSystem.testCFSFile(UnixSystem.java:1444)
         at oracle.ops.mgmt.nativesystem.UnixSystem.isSharedPath(UnixSystem.java:1402)
         at oracle.ops.mgmt.cluster.Cluster.isSharedPath(Cluster.java:916)
         at oracle.ops.mgmt.cluster.Cluster.isSharedPath(Cluster.java:859)
         at oracle.sysman.assistants.util.ClusterUtils.areSharedPaths(ClusterUtils.java:570)
         at oracle.sysman.assistants.util.ClusterUtils.isShared(ClusterUtils.java:501)
         at oracle.sysman.assistants.util.ClusterUtils.isShared(ClusterUtils.java:457)
         at oracle.sysman.assistants.util.attributes.CommonOPSAttributes.updateShared(CommonOPSAttributes.java:724)
         at oracle.sysman.assistants.util.attributes.CommonOPSAttributes.setNodeNames(CommonOPSAttributes.java:207)
         at oracle.sysman.assistants.rconfig.engine.Context.<init>(Context.java:54)
         at oracle.sysman.assistants.rconfig.engine.ASMInstance.createUtilASMInstanceRAC(ASMInstance.java:109)
         at oracle.sysman.assistants.rconfig.engine.Step.execute(Step.java:245)
         at oracle.sysman.assistants.rconfig.engine.Request.execute(Request.java:73)
         at oracle.sysman.assistants.rconfig.engine.RConfigEngine.execute(RConfigEngine.java:65)
         at oracle.sysman.assistants.rconfig.RConfig.<init>(RConfig.java:85)
         at oracle.sysman.assistants.rconfig.RConfig.<init>(RConfig.java:51)
         at oracle.sysman.assistants.rconfig.RConfig.main(RConfig.java:130)
    [main] [0:14:35:152] [Version.isPre10i:189] isPre10i.java: Returning FALSE
    [main] [0:14:35:152] [UnixSystem.getCSSConfigType:1985] configFile=/etc/oracle/ocr.loc
    [main] [0:14:35:157] [Utils.getPropertyValue:221] keyName=ocrconfig_loc props.val=/u02/oradata/orcl/OCRFile propValue=/u02/oradata/orcl/OCRFile
    [main] [0:14:35:157] [Utils.getPropertyValue:221] keyName=ocrmirrorconfig_loc props.val=/u02/oradata/orcl/OCRFile_mirror propValue=/u02/oradata/orcl/OCRFile_mirror
    [main] [0:14:35:157] [Utils.getPropertyValue:292] propName=local_only propValue=FALSE
    [main] [0:14:35:157] [UnixSystem.getCSSConfigType:2029] configType=false
    [main] [0:14:35:158] [Version.isPre10i:189] isPre10i.java: Returning FALSE
    [main] [0:14:35:168] [OCRTree.init:201] calling OCRTree.init
    [main] [0:14:35:169] [Version.isPre10i:189] isPre10i.java: Returning FALSE
    [main] [0:14:35:177] [OCRTree.<init>:157] calling OCR.init at level 7
    [main] [0:14:35:177] [HASContext.getInstance:190] Module init : 24
    [main] [0:14:35:177] [HASContext.getInstance:214] Local Module init : 0
    [main] [0:14:35:177] [HASContext.getInstance:249] HAS Context Allocated: 4 to oracle.ops.mgmt.has.ClusterLock@f47bf5
    [main] [0:14:35:177] [ClusterLock.<init>:60] ClusterLock Instance created.
    [main] [0:14:35:178] [OCR.getKeyValue:411] OCR.getKeyValue(SYSTEM.local_only)
    [main] [0:14:35:178] [nativesystem.OCRNative.Native] getKeyValue: procr_open_key retval = 0
    [main] [0:14:35:179] [nativesystem.OCRNative.Native] getKeyValue: procr_get_value retval = 0, size = 6
    [main] [0:14:35:179] [nativesystem.OCRNative.Native] getKeyValue: value is [false] dtype = 3
    [main] [0:14:35:179] [OCRTreeHA.getLocalOnlyKeyValue:1697] OCRTreeHA localOnly string = false
    [main] [0:14:35:180] [HASContext.getInstance:190] Module init : 6
    [main] [0:14:35:180] [HASContext.getInstance:214] Local Module init : 0
    [main] [0:14:35:180] [HASContext.getInstance:249] HAS Context Allocated: 5 to oracle.ops.mgmt.has.Util@f6438d
    [main] [0:14:35:180] [Util.<init>:86] Util Instance created.
    [main] [0:14:35:180] [has.UtilNative.Native] prsr_trace: Native: hasHAPrivilege
    [main] [0:14:35:184] [HASContext.getInstance:190] Module init : 56
    [main] [0:14:35:184] [HASContext.getInstance:214] Local Module init : 32
    [main] [0:14:35:184] [has.HASContextNative.Native] prsr_trace: Native: allocHASContext
    [main] [0:14:35:184] [has.HASContextNative.Native]
    allocHASContext: Came in
    [main] [0:14:35:184] [has.HASContextNative.Native] prsr_trace: Native: prsr_initCLSR
    [main] [0:14:35:185] [has.HASContextNative.Native]
    allocHASContext: CLSR context [1]
    [main] [0:14:35:185] [has.HASContextNative.Native]
    allocHASContext: retval [1]
    [main] [0:14:35:185] [HASContext.getInstance:249] HAS Context Allocated: 6 to oracle.ops.mgmt.has.ClusterAlias@18825b3
    [main] [0:14:35:185] [ClusterAlias.<init>:85] ClusterAlias Instance created.
    [main] [0:14:35:185] [has.UtilNative.Native] prsr_trace: Native: getCRSHome
    [main] [0:14:35:186] [has.UtilNative.Native] prsr_trace: Native: getCRSHome crs_home=/u01/app/oracle/product/10.2.0/crs(**)
    [main] [0:14:35:280] [ASMTree.getASMInstanceOracleHome:1328] DATABASE.ASM.linux1.+asm1 does exist
    [main] [0:14:35:280] [ASMTree.getASMInstanceOracleHome:1329] Acquiring shared CSS lock SRVM.ASM.DATABASE.ASM.linux1.+asm1
    [main] [0:14:35:280] [has.ClusterLockNative.Native] prsr_trace: Native: acquireShared
    [main] [0:14:35:281] [OCR.getKeyValue:411] OCR.getKeyValue(DATABASE.ASM.linux1.+asm1.ORACLE_HOME)
    [main] [0:14:35:281] [nativesystem.OCRNative.Native] getKeyValue: procr_open_key retval = 0
    [main] [0:14:35:282] [nativesystem.OCRNative.Native] getKeyValue: procr_get_value retval = 0, size = 36
    [main] [0:14:35:282] [nativesystem.OCRNative.Native] getKeyValue: value is [u01/app/oracle/product/10.2.0/db_1] dtype = 3
    [main] [0:14:35:282] [ASMTree.getASMInstanceOracleHome:1346] getASMInstanceOracleHome:ohome=/u01/app/oracle/product/10.2.0/db_1
    [main] [0:14:35:282] [ASMTree.getASMInstanceOracleHome:1367] Releasing shared CSS lock SRVM.ASM.DATABASE.ASM.linux1.+asm1
    [main] [0:14:35:282] [has.ClusterLockNative.Native] prsr_trace: Native: unlock
    [main] [0:14:35:802] [nativesystem.OCRNative.Native] keyExists: procr_close_key retval = 0
    [main] [0:14:35:802] [ASMTree.getNodes:1236] DATABASE.ASM does exist
    [main] [0:14:35:802] [ASMTree.getNodes:1237] Acquiring shared CSS lock SRVM.ASM.DATABASE.ASM
    [main] [0:14:35:802] [has.ClusterLockNative.Native] prsr_trace: Native: acquireShared
    [main] [0:14:35:803] [OCR.listSubKeys:615] OCR.listSubKeys(DATABASE.ASM)
    [main] [0:14:35:803] [nativesystem.OCRNative.Native] listSubKeys: key_name=[DATABASE.ASM]
    [main] [0:14:35:809] [GetASMNodeListOperation.run:78] Got nodes=[Ljava.lang.String;@11a75a2
    [main] [0:14:35:809] [GetASMNodeListOperation.run:91] result status 0
    [main] [0:14:35:809] [LocalCommand.execute:56] LocalCommand.execute: Returned from run method
    [main] [0:14:35:810] [ASMInstanceRAC.loadDiskGroups:2260] diskgroup: instName=+ASM2, diskGroupName=FLASH_RECOVERY_AREA, size=95378, freeSize=88454, type=EXTERN, state=MOUNTED
    [main] [0:14:35:811] [ASMInstanceRAC.loadDiskGroups:2260] diskgroup: instName=+ASM1, diskGroupName=FLASH_RECOVERY_AREA, size=95378, freeSize=88454, type=EXTERN, state=MOUNTED
    [main] [0:14:35:811] [ASMInstanceRAC.loadDiskGroups:2260] diskgroup: instName=+ASM2, diskGroupName=ORCL_DATA1, size=95384, freeSize=39480, type=NORMAL, state=MOUNTED
    [main] [0:14:35:811] [ASMInstanceRAC.loadDiskGroups:2260] diskgroup: instName=+ASM1, diskGroupName=ORCL_DATA1, size=95384, freeSize=39480, type=NORMAL, state=MOUNTED
    [main] [0:14:35:858] [ASMInstance.setBestDiskGroup:1422] sql to be executed:=select name from v$asm_diskgroup where free_mb= (select max(free_mb) from v$asm_diskgroup)
    [main] [0:14:35:864] [ASMInstance.setBestDiskGroup:1426] Setting best diskgroup....
    [main] [0:14:35:888] [SQLEngine.doSQLSubstitution:2165] The substituted sql statement:=select t1.name from v$asm_template t1, v$asm_diskgroup t2 where t1.group_number=t2.group_number and t2.name='FLASH_RECOVERY_AREA'
    [main] [0:14:35:888] [ASMInstance.setTemplates:1345] sql to be executed:=select t1.name from v$asm_template t1, v$asm_diskgroup t2 where t1.group_number=t2.group_number and t2.name='FLASH_RECOVERY_AREA'
    [main] [0:14:35:892] [ASMInstance.setTemplates:1349] Getting templates for diskgroup: oracle.sysman.assistants.util.asm.DiskGroup@170888e
    [main] [0:14:35:892] [ASMInstance.setTemplates:1357] template: PARAMETERFILE
    [main] [0:14:35:893] [ASMInstance.setTemplates:1357] template: DUMPSET
    [main] [0:14:35:893] [ASMInstance.setTemplates:1357] template: DATAGUARDCONFIG
    [main] [0:14:35:893] [ASMInstance.setTemplates:1357] template: FLASHBACK
    [main] [0:14:35:893] [ASMInstance.setTemplates:1357] template: CHANGETRACKING
    [main] [0:14:35:893] [ASMInstance.setTemplates:1357] template: XTRANSPORT
    [main] [0:14:35:893] [ASMInstance.setTemplates:1357] template: AUTOBACKUP
    [main] [0:14:35:893] [ASMInstance.setTemplates:1357] template: BACKUPSET
    [main] [0:14:35:894] [ASMInstance.setTemplates:1357] template: TEMPFILE
    [main] [0:14:35:894] [ASMInstance.setTemplates:1357] template: DATAFILE
    [main] [0:14:35:894] [ASMInstance.setTemplates:1357] template: ONLINELOG
    [main] [0:14:35:894] [ASMInstance.setTemplates:1357] template: ARCHIVELOG
    [main] [0:14:35:894] [ASMInstance.setTemplates:1357] template: CONTROLFILE
    [main] [0:14:35:894] [ASMInstance.createUtilASMInstanceRAC:113] Diskgroups loaded
    [main] [0:14:35:894] [LocalNodeCheck.checkLocalNode:107] Performing LocalNodeCheck
    [main] [0:14:35:894] [OracleHome.getNodeNames:270] inside getNodeNames
    [main] [0:14:36:116] [OracleHome.isClusterInstalled:252] bClusterInstalled=false
    [main] [0:14:36:120] [Step.execute:251] STEP Result=Clusterware is not configured
    [main] [0:14:36:121] [Step.execute:280] Returning result:Operation Failed
    [main] [0:14:36:121] [RConfigEngine.execute:67] bAsyncJob=false
    [main] [0:14:36:124] [RConfigEngine.execute:76] Result=<?xml version="1.0" ?>
    <RConfig>
    <ConvertToRAC>
    <Convert>
    <Response>
    <Result code="1" >
    Operation Failed
    </Result>
    <ErrorDetails>
    Clusterware is not configured
    </ErrorDetails>
    </Response>
    </Convert>
    </ConvertToRAC></RConfig>
    Log file from /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/rconfig/mydb/sqllog
    MYDB     mydb                    2622254467
    10.2.0.1.0     ACTIVE
    cluster_database                                        FALSE
    undo_management                                         AUTO
    db_domain
    dispatchers                                             (PROTOCOL=TCP) (SERVICE=mydbXDB)
    background_dump_dest                                        /u01/app/oracle/admin/mydb/bdump
    user_dump_dest                                             /u01/app/oracle/admin/mydb/udump
    core_dump_dest                                             /u01/app/oracle/admin/mydb/cdump
    audit_file_dest                                         /u01/app/oracle/admin/mydb/adump
    MYDB     mydb                    2622254467
    10.2.0.1.0     ACTIVE
    cluster_database                                        FALSE
    undo_management                                         AUTO
    db_domain
    dispatchers                                             (PROTOCOL=TCP) (SERVICE=mydbXDB)
    background_dump_dest                                        /u01/app/oracle/admin/mydb/bdump
    user_dump_dest                                             /u01/app/oracle/admin/mydb/udump
    core_dump_dest                                             /u01/app/oracle/admin/mydb/cdump
    audit_file_dest                                         /u01/app/oracle/admin/mydb/adump
    MYDB     mydb                    2622254467
    10.2.0.1.0     ACTIVE
    cluster_database                                        TRUE
    undo_management                                         AUTO
    db_domain
    dispatchers                                             (PROTOCOL=TCP) (SERVICE=mydbXDB)
    background_dump_dest                                        /u01/app/oracle/admin/mydb/bdump
    user_dump_dest                                             /u01/app/oracle/admin/mydb/udump
    core_dump_dest                                             /u01/app/oracle/admin/mydb/cdump
    audit_file_dest                                         /u01/app/oracle/admin/mydb/adump
    MYDB     mydb                    2622254467
    10.2.0.1.0     ACTIVE
    cluster_database                                        TRUE
    undo_management                                         AUTO
    db_domain
    dispatchers                                             (PROTOCOL=TCP) (SERVICE=mydbXDB)
    background_dump_dest                                        /u01/app/oracle/admin/mydb/bdump
    user_dump_dest                                             /u01/app/oracle/admin/mydb/udump
    core_dump_dest                                             /u01/app/oracle/admin/mydb/cdump
    audit_file_dest                                         /u01/app/oracle/admin/mydb/adump
    MYDB     mydb                    2622254467
    10.2.0.1.0     ACTIVE
    cluster_database                                        TRUE
    undo_management                                         AUTO
    db_domain
    dispatchers                                             (PROTOCOL=TCP) (SERVICE=mydbXDB)
    background_dump_dest                                        /u01/app/oracle/admin/mydb/bdump
    user_dump_dest                                             /u01/app/oracle/admin/mydb/udump
    core_dump_dest                                             /u01/app/oracle/admin/mydb/cdump
    audit_file_dest                                         /u01/app/oracle/admin/mydb/adump
    Please help me where I am making mistake.
    Thanks

    1) I have created single node standard database called mydb in /u01/app/oracle/product/10.2.0/db_1 home (hostname linux1)
    2) installed crs and asm on linux1 and linux2 and shared storag on ASM(which external HD running ieee1294 cards and ports) . no database is created on linux1 or linux2
    3) I want to convert mydb to RAC DATABASE called mydb1 instance on linux1 and mydb2 on linux2 machine respectively.
    4) copied and modifed xml as you see above called ConvertTomydb.xml to $ORACLE_HOME/bin directory
    5) when I run
    $rconfig ConvertTomydb.xml from $ORACLE_HOME/bin directory , i get the following error
    <ConvertToRAC>
    <Convert>
    <Response>
    <Result code="1" >
    Operation Failed
    </Result>
    <ErrorDetails>
    Clusterware is not configured
    </ErrorDetails>
    </Response>
    </Convert>
    </ConvertToRAC>
    $
    Please see my crs_stat -t command output
    Name Type Target State Host
    ora....SM1.asm application ONLINE ONLINE linux1
    ora....X1.lsnr application ONLINE ONLINE linux1
    ora.linux1.gsd application ONLINE ONLINE linux1
    ora.linux1.ons application ONLINE ONLINE linux1
    ora.linux1.vip application ONLINE ONLINE linux1
    ora....SM2.asm application ONLINE ONLINE linux2
    ora....X2.lsnr application ONLINE ONLINE linux2
    ora.linux2.gsd application ONLINE ONLINE linux2
    ora.linux2.ons application ONLINE ONLINE linux2
    ora.linux2.vip application ONLINE ONLINE linux2
    ora.orcl.db application ONLINE ONLINE linux1
    ora....l1.inst application ONLINE ONLINE linux1
    ora....l2.inst application ONLINE ONLINE linux2
    ora....test.cs application ONLINE ONLINE linux1
    ora....cl1.srv application ONLINE ONLINE linux1
    ora....cl2.srv application ONLINE UNKNOWN linux2
    please see the output from olsnodes command
    [oracle@linux1 bin]$ olsnodes
    linux1
    linux2
    [oracle@linux1 bin]$
    What is your cache fusion interconnect strategy?
    I don't about this, please let me know where can i find the answers. what kind of command do i have to use get the answer
    damorgan , Please let me know, if I gave answers to your questions. if not please let me know, i can give as much as possible. i really appreciate for your help
    Thanks

  • How to remove a node from a xml

    Hi All,
    I want to remove a node from my xml output. Can anyone suggest me how to get that? I want to implement this by using the ASSIGN activity.
    My sample output is
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
         <env:Header>
              <wsa:MessageID>urn:4EF1A350677C11E1BFA7794ED76B03EF</wsa:MessageID>
              <wsa:ReplyTo>
                   <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
              </wsa:ReplyTo>
         </env:Header>
         <env:Body>
              <SiebelOrderQueryByExample_Output xmlns="http://siebel.com/asi/">
                   <ListOfOrderInterface xmlns="http://www.siebel.com/xml/Siebel%20Order">
                        <Orders>
                             <Id>1-15IXJ</Id>
                             <AccountId>1-2EE</AccountId>
                             <OrderNumber>1012-1234</OrderNumber>
                             <ListOfLineItems>
                                  <LineItems>
                                       <Id>1-15IYN</Id>
                                       <LineNumber>303</LineNumber>
                                       <OrderNumber>1012-1234</OrderNumber>
                                       <OrderHeaderId>1-15IXJ</OrderHeaderId>
                             </LineItems>
                                  </ListOfLineItems>
                             </Orders>
    </ListOfOrderInterface>
              </SiebelOrderQueryByExample_Output>
         </env:Body>
    </env:Envelope>
    I want to delete the <ListOfLineItems>node from the xml above so that my resultant would be,
         <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
         <env:Header>
              <wsa:MessageID>urn:4EF1A350677C11E1BFA7794ED76B03EF</wsa:MessageID>
              <wsa:ReplyTo>
                   <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
              </wsa:ReplyTo>
         </env:Header>
         <env:Body>
              <SiebelOrderQueryByExample_Output xmlns="http://siebel.com/asi/">
                   <ListOfOrderInterface xmlns="http://www.siebel.com/xml/Siebel%20Order">
                        <Orders>
                             <Id>1-15IXJ</Id>
                             <AccountId>1-2EE</AccountId>
                             <OrderNumber>1012-1234</OrderNumber>
         </Orders>
    </ListOfOrderInterface>
              </SiebelOrderQueryByExample_Output>
         </env:Body>
    </env:Envelope>     
    Please suggest something Its urgent.
    Thanks in Advance.

    It goes something like this, taken from the above blog entry:
    Removing a node from node-list
    With the bpelx: extensions in BPEL you are able to insert and update nodes in a node list. A node-list is an XML message that contains a set of records. In this article I use the following example:
    <BookList xmlns="http://message.vijfhuizen.com">
    <Book>
    <title>The Lord Of The Rings</title>
    <author>J.R.R. Tolkien</author>
    </Book>
    <Book>
    <title>Harry Potter</title>
    <author>J.R.R. Tolkien</author>
    </Book>
    <Book>
    <title>The Hobbit</title>
    <author>J.R.R. Tolkien</author>
    </Book>
    <Book>
    <title>Storm; Chronicals of Pandarve</title>
    <author>Don Lawrence</author>
    </Book>
    </BookList>
    For creating and updating node lists the bpelx: functions are enough to handle this. But when you want to remove a particular node, you can use the bpelx:remove function. But this function can only remove a node from a particular position. For example removing the second node you code:
    <bpel:assign>
    <bpelx:remove>
    <bpelx:target variable="VarBookList" query="/Booklist/Book[2]" />
    </bpelx:append>
    </bpel:assign>
    It is hard to code the bpelx:remove to create a xpath to dynamicly remove node. You would like to remove the second node based on the xpath:
    /Booklist/Book[title="Harry Potter" and author="J.R.R. Tolkien"]
    You can add the above xpath in the bpelx:remove, but you are not able to make this dynamically.
    There is a solution. The trick is to create a stylesheet that copies the data into a new message, but removing that particular records. Create a stylesheet that does the normal copy of the XML message. Then add a <choose> element in the stylsheet to filter that particular record.
    <xsl:template match="/">
    <BookList>
    <xsl:for-each select="/BookList/Book">
    <xsl:choose>
    <xsl:when test="title='Harry Potter' and author='J.R.R. Tolkien'"/>
    <xsl:otherwise>
    <Book>
    <title>
    <xsl:value-of select="title"/>
    </title>
    <author>
    <xsl:value-of select="author"/>
    </author>
    </Book>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:for-each>
    </BookList>
    Now we have a XSL stylesheet that removes a particular record, but this is not variable. This can be done via XSLT parameters.
    <xsl:param name="pTitle"/>
    <xsl:param name="pAuthor"/>
    <xsl:template match="/">
    <BookList>
    <xsl:for-each select="/BookList/Book">
    <xsl:choose>
    <xsl:when test="title=$pTitle and author=$pAuthor"/>
    <xsl:otherwise>
    <Book>
    <title>
    <xsl:value-of select="title"/>
    </title>
    <author>
    <xsl:value-of select="author"/>
    </author>
    </Book>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:for-each>
    </BookList>
    </xsl:template>
    Now we are able to use this stylesheet in BPEL. In general BPEL create the following code:
    <assign name="Transform">
    <bpelx:annotation>
    <bpelx:pattern>transformation</bpelx:pattern>
    </bpelx:annotation>
    <copy>
    <from expression="ora:processXSLT('RemoveNode.xsl'
    , bpws:getVariableData('Variable_BookList','payload')" />
    <to variable="Variable_BookListTemp" part="payload"/>
    </copy>
    </assign>
    But this code does not pass parameters to the stylesheet. The ora:processXSLT() can do this it has an additional parameter in this function:
    <assign name="Transform">
    <bpelx:annotation>
    <bpelx:pattern>transformation</bpelx:pattern>
    </bpelx:annotation>
    <copy>
    <from expression="ora:processXSLT('RemoveNode.xsl'
    , bpws:getVariableData('Variable_BookList','payload')" />
    , bpws:getVariableData('BPELxslparameters'))"/>
    <to variable="Variable_BookListTemp" part="payload"/>
    </copy>
    </assign>
    Now only you have to create the BPELxslparameters variable and assign it with the correct name/value pairs. The structure of the this variable is as follows:
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/service/bpel/common"
    targetNamespace="http://schemas.oracle.com/service/bpel/common"
    elementFormDefault="qualified">
    <xsd:element name="parameters">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="item" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="value" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    Create in BPEL the variable BPELxslparameters and let it point to this strucure:
    <process ....
    xmlns:common="http://schemas.oracle.com/service/bpel/common"
    .../>
    <variable name="BPELparameters" element="common:parameters"/>
    Now we can in BPEL create an empty XML message, based on this strcuture and assign the values to these parameters and then call the processXSLT function.
    <bpelx:assign name="Assign_GenerateEmptyParameterSet">
    <copy>
    <from>
    <parameters xmlns="http://schemas.oracle.com/service/bpel/common">
    <item>
    <name>pTitle</name>
    <value/>
    </item>
    <item>
    <name>pAutor</name>
    <value/>
    </item>
    </parameters>
    </from>
    <to variable="BPELparameters" query="/common:parameters"/>
    </copy>
    </bpelx:assign>
    <assign name="Assign_setXSLTParameters">
    <copy>
    <from expression="'Harry Potter'"/>
    <to variable="BPELparameters" query="/common:parameters/common:item[1]/common:value"/>
    </copy>
    <copy>
    <from expression="'J.R.R. Tolkien'"/>
    <to variable="BPELparameters" query="/common:parameters/common:item[1]/common:value"/>
    </copy>
    </assign>
    Posted by Marc Kelderman SOA Blog at 1/16/2008 09:20:00 PM

  • Node refnum comparison (XML parser)

    Hello,
    I am trying to parse an XML document (actually an Open Office doc) with the LabVIEW 2009 built-in XML Parser. My problem is to identify if two Nodes are actually refering to the same point in the XML or not. For example:
    I do a search for specific table cells. The result is an array of Nodes. I want to know if they are on the same table row. So I go up to the first "table row" parent, of which I get the reference. Now I would like to compare two of these parent "row" references, to check if they refer to the same table row. Use of the "equal" LabVIEW function seems not to work (always pretends the reference is different, even if pointing to the same table row actually).
    Any idea ?
    Vincent

    Hello,
    Thank you for your interest for the topic. Here is a small example, which is described here:
    Assume you have an XML with following content:
    <XML>
    <Parent>
         <Child name="A1">
              <Feature />
         </Child>
         <Child name="A2">
              <NoFeature />
         </Child>
    </Parent>
    <Parent>
         <Child name="B1">
              <Feature />
         </Child>
         <Child name="B2">
              <NoFeature />
         </Child>
    </Parent>
    </XML>
    Let's say I need to find all the <Feature> nodes and check whether or not they belong to the same <Parent>. If I look for all the <Feature> nodes by sequentially parsing the whole XML (with a combination of "Next Sibling" and "Next Child" navigation), I will certainly know when I switch from one <Parent> instance to the other one, but this is very inefficient for large XML. I have chosen to use the following method instead:
    - with the "Get Elements by Tag Name Array" method for the XML document (DUXGetElementsByTagName), I get an array of all the <Feature> nodes in the document. These are node references to <Child name="A1"/> and <Child name="B2"/> in the above example.
    - from both of these nodes I go up to successive parents until I find the <Parent> node reference.
    - now I have two different references to <Parent> nodes. I am almost over, I just need to check whether these are the same <Parent> node, or if they are different instances of a <Parent> node (as it is the case in the above example).
    How can I do this last step ? Comparing the node references directly with the general "Equal?" built-in LabVIEW function does not work (result is always FALSE, even if both node references point to the same node instance). What is missing here is a sort of "IsSameNode" method, with two node references as inputs, and a boolean as output, that would just return TRUE if both references are pointing to the same node in the XML...
    Hope this helps.
    Best regards,
    Vincent
    Attachments:
    Demo_XML_Parser.zip ‏25 KB

  • ORA-31185 DOM NODES DO NOT BELONG TO THE SAME DOCUMENT

    Hi all,
    I developed an Oracle function that returns a XMLTYPE. In this function, I first created a node <ROOT> and I would like to append children nodes to this root node.
    To create children nodes I loop on a cursor and each iteration of this loop "build" a XMLTYPE node. I would like append this XMLTYPE node to the root node but for now I get the ORA-31185 error !
    Here is the code of my function (simplified version (without use of cursor)):
    CREATE OR REPLACE
    FUNCTION GET_MEDOC2 RETURN XMLTYPE IS
          parent_document DBMS_XMLDOM.DOMDOCUMENT;
       parent_rootnode DBMS_XMLDOM.DOMNODE;
       child_document  DBMS_XMLDOM.DOMDOCUMENT;
       child_rootnode  DBMS_XMLDOM.DOMNODE;
       rootXML XMLTYPE;
       subXML XMLTYPE;
       countLOOP NUMBER;
    BEGIN
        SELECT XMLELEMENT("ROOT") INTO rootXML FROM DUAL;
        parent_document := DBMS_XMLDOM.newDOMDocument(rootXML);
        parent_rootnode := DBMS_XMLDOM.makeNode(DBMS_XMLDOM.getDocumentElement(parent_document));
         FOR countLOOP IN 1..10 LOOP
            SELECT XMLELEMENT("CHILD", countLOOP) INTO subXML FROM DUAL;
            child_document  := DBMS_XMLDOM.newDOMDocument(subXML);
            child_rootnode  := DBMS_XMLDOM.makeNode(DBMS_XMLDOM.getDocumentElement(child_document));   
            child_rootnode := DBMS_XMLDOM.appendchild(parent_rootnode, child_rootnode);  
         END LOOP;
         RETURN rootXML;
    END GET_MEDOC2;When I execute the following :
    SELECT GET_MEDOC2() FROM DUAL;I get the beautiful ORA-31185 DOM NODES DO NOT BELONG TO THE SAME DOCUMENT
    What I expect is an XML like this :
    <ROOT>
        <CHILD>1</CHILD>
        <CHILD>2</CHILD>
        <CHILD>3</CHILD>
        <CHILD>4</CHILD>
        <CHILD>5</CHILD>
        <CHILD>6</CHILD>
        <CHILD>7</CHILD>
        <CHILD>8</CHILD>
        <CHILD>9</CHILD>
        <CHILD>10</CHILD>
    </ROOT>Can someone help me please ? (I'm on Oracle 10.1.0.5.0)
    Thanks

    Hi,
    I get the beautiful ORA-31185 DOM NODES DO NOT BELONG TO THE SAME DOCUMENTYou need function importNode (or adoptNode) to copy nodes across different documents.
    But, do not use DOM manipulation in this case.
    A single query using SQL/XML functions is certainly simpler and more performant :
    SELECT XMLElement("ROOT",
             XMLAgg(
               XMLelement("CHILD",
                 XMLForest(
                   empno
                 , ename
               ) order by empno
           ) as result
    FROM (
      -- your query goes here, e.g. :
      SELECT empno, ename
      FROM scott.emp
    <ROOT>
      <CHILD>
        <EMPNO>7369</EMPNO>
        <ENAME>SMITH</ENAME>
      </CHILD>
      <CHILD>
        <EMPNO>7499</EMPNO>
        <ENAME>ALLEN</ENAME>
      </CHILD>
      <CHILD>
        <EMPNO>7521</EMPNO>
        <ENAME>WARD</ENAME>
      </CHILD>
      <CHILD>
        <EMPNO>7566</EMPNO>
        <ENAME>JONES</ENAME>
      </CHILD>
      <CHILD>
        <EMPNO>7654</EMPNO>
        <ENAME>MARTIN</ENAME>
      </CHILD>
      <CHILD>
        <EMPNO>7698</EMPNO>
        <ENAME>BLAKE</ENAME>
      </CHILD>
      <CHILD>
        <EMPNO>7782</EMPNO>
        <ENAME>CLARK</ENAME>
      </CHILD>
      <CHILD>
        <EMPNO>7839</EMPNO>
        <ENAME>KING</ENAME>
      </CHILD>
      <CHILD>
        <EMPNO>7844</EMPNO>
        <ENAME>TURNER</ENAME>
      </CHILD>
      <CHILD>
        <EMPNO>7900</EMPNO>
        <ENAME>JAMES</ENAME>
      </CHILD>
      <CHILD>
        <EMPNO>7902</EMPNO>
        <ENAME>FORD</ENAME>
      </CHILD>
      <CHILD>
        <EMPNO>7934</EMPNO>
        <ENAME>MILLER</ENAME>
      </CHILD>
    </ROOT>

  • Upadting a XML node value to another table

    Hi guys,
    Can you please tell me, what is wrong with the below query
    update csabcd cs set (cs.ELEMENT,cs.ELEMENT2,cs.ELEMENT3) =
            (select x.* from abcde a, xmltable ('.' passing XMLTYPE(a.xml)
                 columns mort1 varchar2 (80) path '/alert/tab1/details/Element',
                         mort2 varchar2 (80) path '/alert/tab1/details/Element2',
                         mort3 varchar2 (80) path '/alert/tab1/details/Element3'
                         ) x  where cs.aid = a.aid);i get this error
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00229: input source is empty
    Error at line 0
    ORA-06512: at "SYS.XMLTYPE", line 254
    ORA-06512: at line 1Edited by: Depakjan on Oct 21, 2010 1:35 PM

    Well from that sample, the XMLTABLE works ok...
    SQL> ed
    Wrote file afiedt.buf
      1  with abcde as (select '<?xml version="1.0" encoding="UTF-8"?>
      2  <alert>
      3    <tab0 comment="section in XSL component" name="Initial Information">
      4      <details>
      5        <Priority>0001</Priority>
      6        <DateVRUClaimInitiated>2010-06-29</DateVRUClaimInitiated>
      7      </details>
      8      <contacts comment="grid in XSL component">
      9        many child nodes here
    10      </contacts>
    11    </tab0>
    12    <tab1 comment="section in XSL component" name="Additional Information">
    13      <details comment="list collection in XSL component">
    14        <Channel1>123</Channel1>
    15        <Element>1234</Element>
    16        <Element2>1234</Element2>
    17        <Element3>1234</Element3>
    18      </details>
    19      <IPAddresses>
    20        Many child nodes here
    21      </IPAddresses>
    22      <ANIPhones>
    23        Many child nodes here
    24      </ANIPhones>
    25    </tab1>
    26  </alert>' as xml from dual)
    27  --
    28  --
    29  --
    30  select x.*
    31  from abcde a
    32      ,xmltable ('.'
    33                 passing xmltype(a.xml)
    34                 columns mort1 varchar2 (80) path '/alert/tab1/details/Element'
    35                        ,mort2 varchar2 (80) path '/alert/tab1/details/Element2'
    36                        ,mort3 varchar2 (80) path '/alert/tab1/details/Element3'
    37*               ) x
    SQL> /
    MORT1      MORT2      MORT3
    1234       1234       1234
    SQL>There must be something else in the XML that's causing the problem.
    What happens if you just do:
    select xmltype(xml) from abcde(add appropriate where clause for particular ID if necessary)
    Is it able to convert the xml strings to xmltype ok?

  • How I can append new node in existing  XML file

    I've just begun learning DOM XML , so I'm currently at a very beginner level.
    I have an existing XML file that I would like to add an additional node to before saving it to another variable.
    how I can append new node in this file.
    now this code is overwrite new data over old data
    The code looks like this:
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerFactoryConfigurationError;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Attr;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    public class VerbXMLWriter
        static String EVerb3;
        static String englishTranslate3;
        public void VerbXMLWriter(String EVerb, String englishTranslate )
             EVerb3 = EVerb;
             englishTranslate3=englishTranslate;
        File xmlFile = new File("VerbDB.xml");
        DocumentBuilderFactory factory =  DocumentBuilderFactory.newInstance();
        try
         DocumentBuilder builder = factory.newDocumentBuilder();
         Document document = builder.newDocument();
        Element root = document.createElement("Verb");
         document.appendChild(root);
         Element verb = document.createElement(EVerb3);
         verb.setAttribute("EnglishTranslate",englishTranslate3);
         root.appendChild(verb);
         Source xmlSource = new DOMSource( document );
         Result result = new StreamResult( new FileOutputStream(xmlFile) );
        TransformerFactory transformerFactory = TransformerFactory.newInstance();
        Transformer transformer =
        transformerFactory.newTransformer();
        transformer.setOutputProperty( "indent", "yes" );
         transformer.transform( xmlSource, result );
      catch(TransformerFactoryConfigurationError factoryError )
        factoryError.printStackTrace();
       catch (ParserConfigurationException pc)
           pc.printStackTrace();
       catch (IOException io)
          io.printStackTrace();
       catch(Exception excep )
           excep.printStackTrace();
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <Verb>
    <Play EnglishTranslate="playing" />
    </Verb>Edited by: itb402 on Mar 9, 2008 6:05 AM

    in your code you are already appending new nodes to the root node. so what exactly is your problem? The following steps are usually taken for appending a new node:
    1. Read the XML document
    2. Build a DOM tree
    3. Navigate to the node under which you want to insert the new node
    4. Create a new node.
    5. Insert the new node to the node selected in point #3.
    ~Debopam

Maybe you are looking for

  • Discoverer report showing wrong output

    Hi all We have made a discoverer report called Generic Employee list which is having 37202 records. But in the front end it is showing only 7001 records. I have checked that query in toad there i am getting 37202 records and i checked in discoverer d

  • What needs to be corrected in UCCHECK ?

    Hello, We need to pass unicode soon so we are executing transaction UCCHECK in our system. We don't know really what to put in the selection screen so we put * in all parameters and set checkboxes in order to take the maximum objetcs possible. We saw

  • How to assign SAP forms in FB50, F-28 and F-53

    Greetings for the day, Actually my client's business is like retail business so they are accepting daily N no.of payments from their customers. Now my problem is they need a print receipt for each transactions and that to be according to their own fo

  • What's apple's plan for preordered iphone 4 customers w.o confimation email

    Many people have pre-ordered the iPhone 4 using the Apple website and reached the end to the confirmation page saying what to bring and that we'll receive a confirmation email soon, but hours and days later, handfuls of us have yet to receive the con

  • Won't go to selected websites, says "Internet Explores not responding"

    At different times of the day, almost always early in the morning when I try to get to my home page or to my e-mail account it will say "(Internet Expolorer is not responding.)"  My computer is pretty slow quite often.  It's about 7 years old and I r