Select in the XML schema

I hope this is the right forum to post. I was wondering if there is any good tutorials or books on SQL in XML format?
Basically, I need to interrogate the accounts of North Carolina who received a document given in the past day. This is a very easy task to do, in SQL, however, the State of North Carolina wants us to share our findings in a specific XML schema using nodes.

Fortunately, I have the pattern that was given by the State of NC but don't know how to get my application to fit in the XML schema. I was wondering in a beginners perspective.

Sorry for the newbie questions.

Don't know if you're aware of this, or if it does not meet your definition of "user friendly".
http://www.Oracle.com/technology/documentation/index.html

Also fly over the intro or first chapter for the DB XML (research in your appropriate version) can be a good thing to do.

I'm not sure what your analyst is trying to say. In the example I've provided, root and the neck are nodes in the XML document. Most of the things in XML are nodes.

Tags: Oracle Development

Similar Questions

  • Access to the XML schemas from the connection manager?

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

    Using lists yet... »

    XML schemas

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

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

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

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

    Kind regards
    Gary

    SQL development team

  • I am trying to save the xml schema and get error

    SQL > START
    (2) DBMS_XMLSCHEMA.registerSchema
    3 SCHEMAURL = > "http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd"
    4 SCHEMADOC = > bfilename('XMLDIR','fgdc-std-001-1998.dtd'),
    5 CSID = > nls_charset_id ('AL32UTF8'));
    6 END;
    6 N
    BEGIN
    *
    ERROR on line 1:
    ORA-31011: XML parsing failed
    ORA-19202: an error has occurred in the processing of XML
    LPX-00247: invalid declaration DTD (Document Type)
    Error on line 45
    ORA-06512: at "XDB". DBMS_XMLSCHEMA_INT', line 37
    ORA-06512: at "XDB". DBMS_XMLSCHEMA', line 61
    ORA-06512: at "XDB". DBMS_XMLSCHEMA", line 126
    ORA-06512: at line 2

    the xml code that I am trying register is
    <? XML version = "1.0" encoding = "ISO-8859-1? >
    <! DOCTYPE metadata SYSTEM "http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd" >
    < metadata >
    < idinfo >
    < quote >
    < citeinfo >
    < source > FDM < / original >
    < pubdate > 20040512 < / pubdate >
    < pubtime > 09000000 < / pubtime >
    < title > BAS_EASEMENT < / title >
    etc.

    Pls help me for the recording of the xml schema.

    If your DTD is valid...

    .. then the following may help...

    Re: conversion of xmltype, error ORA-31011

    See the last comment on this mentioned by Mark Drake

    --
    -- Turn off DTD Validation
    --
    alter session set events ='31156 trace name context forever, level 2
    / 
    
  • the output of XML validation against the XML schema for the Oracle

    Hi all
    We have a requirement where we need to extract all the data from the client to the format of OIOXML (standard at the Denmark) and FTP data for data buyers. I need some information about how we can generate an XML in the specified format of user and validate the XML generated using Oracle Pl/Sql. Once a week we FTP almost 1 million documents, is possible to validate all data that we send. Please provide some guidance.

    Oracle version: 9.2.0.8

    Thanks in advance
    Rambeau

    Published by: user584123 on May 30, 2009 08:39

    user584123 wrote:
    Please respond to my query

    I thought I already did.
    You ask in the right forum.

  • Connecting the Image with the XML schema field

    I have a requirement that I'm working on which would require me to generate dynamic PDFS so that the text as well as images in the PDF must depend on the input XML I get. So in this respect, my question is how can I link an image with an element field in the example of XML data or with an element in the schema. Because of this feature supported by the tool. Generated PDF can have dynamic images in them.

    Any help in this direction would be greatly appreciated.

    Thanks in advance.

    Srini

    If it is possible can you retrieve the contents of the image of the DB and incorporate them into the data file? You have base64 encode.

    Paul

  • Display the error when the xml document is not valid against the schema

    Hello

    I'm using isChemaValid() in a way that, to determine if the xml document is valid against the xml schema.

    This function returns only 0 or 1, and I want to display the error and the line number if the xml is not valid.

    How can I achieve this?

    Thanks in advance,

    Elad

    Use the XMLType schemaValidate() method. It will throw an exception whose message contains the validation error.

    Get a number of 'line' is not sensible as XML is concerned.

  • Multi attribute in xml - in the element schema root

    Hello

    I have several attribute in the xml file. all of them - in the root element.

    I know I have to put the declaration of the attribute in the lower part of the Diagram.

    When I put that one attribute in the schema - everything is OK.

    but I have more than one attribute (I have 8 attributes...), and I get this error:

    ORA-01460: LETTER, DEAD OR UNREASONABLE CONVERSION


    XML file:

    < MyRootElement Myattribute1 = 'MyValue1 '.

    MyAttribute2 = "MyValue2".

    MyAttribute3 = "MyValue3".

    "xmlns ="http://www.oracle.com/xml/test.xsd"

    xmlns ="http://www.w3.org/2001/xmlSchema-instance at the beginning of this line there should be written:" xmlns: xsi", but it's gone...".

    xsi: schemaLocation =http://www.oracle.com/xml/test.xsd my_schema_file.xsd' > '.

    XSD file:

    "" < schema targetNameSpace = "http://www.oracle.com/xml/test.xsd"

    "xmlns ="http://www.w3.org/2001/xmlSchema"

    xmlns: xdb = "http://xmlns.oracle.com/xdb."

    version = "1.0".

    elementFormDefault = "qualified" >

    < element name = "MyRootElement" >

    < complexType >

    < sequence >

    ----------------

    -the rest of the xsd file.

    ---------------------------------------------

    < / sequence >

    < attribute name = "MyAttribute1" type = "string" use = "required".

    < attribute name = "MyAttribute2" type = "string" use = "required".

    < / complexType >

    < / item >

    < / schema >

    Someone knows what's the problem?

    Thanks in advance,

    Elad

    Thank you.

    Okay... where to start? Almost everything is bad or at least very awkward

    (1) do not use the physical path with UTL_FILE, that has been obsolete for many years now. Use directory objects.

    And in fact, you don't even have UTL_FILE here.

    (2) the XML schema must be saved at once, in a separate script.

    Or do you expect to change them as often you must include the part of the record of the proceedings?

    (3) If your input XML document has an attribute xsi: schemaLocation, make sure that you save the schema using the same URL.

    In your example, there is a mismatch: 'my_schema_file.xsd' vs 'xml_schema.xsd' in the register command.

    So, to summarize:

    Create a directory:

    create or replace directory xml_dir as ' / home/myPath ";

    Save the schema (once):

    () dbms_xmlschema.registerschema

    schemaurl-online "my_schema_file.xsd."

    schemadoc-online xmltype)

    BFILENAME ('XML_DIR', '')

    , nls_charset_id ('AL32UTF8') - use the actual encoding of the file here

    )

    local-online true

    genTypes-online fake

    gentables-online fake

    enableHierarchy-online dbms_xmlschema.enable_hierarchy_none

    );

    So here's how I would rewrite the function:

    create or replace function schema_xml_333 (p_tested_xml in varchar2)

    return varchar2

    is

    doc xmltype: = xmltype (bfilename ('XML_DIR', p_tested_xml), nls_charset_id ('AL32UTF8'));

    Start

    return case when doc.isSchemaValid () = 1

    then "XML is valid.

    otherwise "XML is not valid.

    end;

    end;

    /

    Yet once, this will not work if the XML contains an attribute xsi: schemaLocation whose part URL pattern matches the URL used for recording.

    In this case, you don't need the createSchemaBasedXML method.

  • How to create the default column in XML schema?

    Hi all

    I would like to define a default column Let's say Run_Date as Date data type in XML (XSD) schema definition and would fill column Run_Date SYSDATE, when XML documents are parsed to this schema.
    Let me know, how can we achieve?

    Thanks in advance.

    Also, I can not change the contents of the XML file, because it is generated by another language, but I can change the definition of XML schema, if necessary.

    Well, if you can not change the XML instance, you cannot change the schema, it conforms to the.
    You can add an optional attribute whose value by default, but we can only use a static value.

    How do you insert the file into the table?

  • If you programmatically, via an INSERT statement, then I think your best bet is to create a new table with a relational schema XMLType column and a DATE column:

    CREATE TABLE employees (
      dt_created date default sysdate not null
    , xmldoc     xmltype
    , CONSTRAINT emp_pk PRIMARY KEY (xmldoc."XMLDATA".EMP_NO)
    )
    XMLTYPE COLUMN xmldoc STORE AS OBJECT RELATIONAL
    XMLSCHEMA "EMP.xsd" ELEMENT "Emp" ;
    

    If you choose to do so, remove the XML schema and enter it again with "genTables-online false."

  • If you have inserted the file via the XDB (FTP, WebDAV, createResource) repository and relying on the table by default feature, then you may be out of luck.
    There is probably a way to tamper with the underlying structure of GOLD among a hidden column do accept a default value, but since it is not supported I won't even try.

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

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

    1 ~/

    2 ~ /Person/

    3 ~ /Person/ âge /

    4 ~ /Person/ homecity /

    5 ~ /Person/ nom /

    6 ~ /Person/ AccueilGuides/lat /

    7 ~ /Person/ AccueilGuides/name /

    8 ~ /Person/ homecity / long /

    But when the XML is changed to

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

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

    1~/
     2~/person/

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

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

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

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

    Thank you.

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

    Here's the idea:

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

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

    (it is now an integrated 12 c btw)

    (2) enter these two schemas:

    Start

    () dbms_xmlschema.registerSchema

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

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

    local-online true

    genTypes-online fake

    genTables-online fake

    enableHierarchy-online dbms_xmlschema. ENABLE_HIERARCHY_NONE

    options-online dbms_xmlschema. REGISTER_BINARYXML

    );

    end;

    /

    Start

    () dbms_xmlschema.registerSchema

    schemaURL-online "SCTCvfBlkCredTrf.xsd."

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

    local-online true

    genTypes-online fake

    genTables-online fake

    enableHierarchy-online dbms_xmlschema. ENABLE_HIERARCHY_NONE

    options-online dbms_xmlschema. REGISTER_BINARYXML

    );

    end;

    /

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

    with schema_list (schema_url, schema_owner) as)

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

    Union of all the

    Select sd.dep_schema_url, sd.dep_schema_owner

    of schema_list sl

    Join dba_xml_schema_dependency on sd.schema_url = sl.schema_url sd

    and sd.schema_owner = sl.schema_owner

    ),

    namespace_mapping (target_namespace, prefix) as long as)

    Select target_namespace

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

    of user_xml_schema_namespaces

    where schema_url in (select schema_url from schema_list)

    ),

    () schema_nodes

    is_attr

    node_name

    max_occurs

    element_id

    parent_element_id

    target_namespace

    schema_url

    ) as)

    Select 0

    element_name as node_name

    xmlcast)

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

    as varchar2 (10)

    )

    element_id

    parent_element_id

    target_namespace

    schema_url

    of user_xml_schema_elements

    where schema_url in (select schema_url from schema_list)

    Union of all the

    Select 1

    attribute_name as node_name

    null

    null

    element_id

    target_namespace

    schema_url

    of user_xml_schema_attributes

    where schema_url in (select schema_url from schema_list)

    )

    Select the level

    sn.node_name

    sn.max_occurs

    connect_by_isleaf as is_leaf

    sys_connect_by_path)

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

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

    SN. NODE_NAME

    , '/'

    ) as xpath

    -, target_namespace

    of schema_nodes sn

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

    Connect prior sn.element_id = sn.parent_element_id

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

    and sn.parent_element_id is null

    ;

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

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

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

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

  • OSB: Mail Proxy Service retrieve only the xml message that has of the

    Hi all.
    I have a Service Proxy with the type of Messaging Service that read xml from a message queue.
    Type of Message in the proxy request is xml and I have provided the type information by stating (in the element and the type of field), the XML schema for the XML document type exchanged.

    I need the service proxy to retrieve xml messages that have the appropriate schema from the queue.

    But when the proxy retrieves a msg of xml in the queue independently of their schema definition.

    Appreciate your comments.

    THX,
    Ross

    Published by: user6677631 on February 25, 2013 09:52

    Published by: user6677631 on February 25, 2013 10:02

    Select the XML schema for the type of query in a messaging proxy does not entering from the schema XML message validation. Similarly, if you create a proxy based WSDL validation against definition WSDL only will not happen automatically. Choose XML as the message type only will ensure that all XMLs malformed will be rejected before entering the flow of messages. For validation against the schema, you need to explicitly add an action to validate in the proxy mail flow, if the validation fails triggers an error and get back the message to the queue or save the wrong message and commit the post/message to a queue of the error.

  • XDB annotations on complex XML schema

    I'm testing this 11 GR 2 Express, while I wait for our DBA upgrade our main instance of AIX dev to GR 11, 2 enterprise edition.

    I have a fairly complex xmlschema, provided by the IPTC and trying to annotate to replace some of the mappings by default sqltype, but running to problems with how/where to annotate.

    Of what I have learned so far, annotations to replace possible sqltype only mappings on complexType and simpleTypes. ComplexTypes must correspond to a sql object type and simpleTypes map based sqlType atomic.

    How might you have an instance where a complex type extends a XS: String... but the need to have this channel map to a CLOB and not a varchar2 (4000)?
    <xs:element name="inlineData">
                                                      <xs:annotation>
                                                           <xs:documentation>A rendition of the content using plain-text or encoded inline data</xs:documentation>
                                                      </xs:annotation>
                                                      <xs:complexType>
                                                           <xs:simpleContent>
                                                                <xs:extension base="xs:string">
                                                                     <xs:attributeGroup ref="newsContentAttributes" />
                                                                     <xs:attributeGroup ref="newsContentTypeAttributes" />
                                                                     <xs:attribute name="encoding" type="QCodeType">
                                                                          <xs:annotation>
                                                                               <xs:documentation>The encoding applied to the content before inclusion</xs:documentation>
                                                                          </xs:annotation>
                                                                     </xs:attribute>
                                                                     <xs:attributeGroup ref="newsContentCharacteristics" />
                                                                     <xs:attributeGroup ref="i18nAttributes" />
                                                                     <xs:anyAttribute namespace="##other" processContents="lax" />
                                                                </xs:extension>
                                                           </xs:simpleContent>
                                                      </xs:complexType>
                                                 </xs:element>
    Adding the xdb: annotation of mapUnboundedStringToLob to the item "inlineData" fails... invalid... and it cannot add to the extension is... If a viable option of valid in this case, would be to create a simpleType, call it say "LargeStringToClob" with a restriction of the type xs: String... and then annotate this simpleType to map to a CLOB.

    Then change the extension of the element inlineData of XS: String to 'LargeStringToClob '? I intend to use a column of XMLType BinaryXML storage...

    I was hoping not to have to change the xml schema too, but I guess its to be expected when you try to map in Oracle.

    I am facing a similar problem trying to annotate timestamp with time zone...

    some items are reported as unions of other types. What I've read, Oracle cards to varchar2 (4000)

    Example:
    <xs:simpleType name="DateOptTimeType">
              <xs:annotation>
                   <xs:documentation>The type of a date (required) and a time (optional).</xs:documentation>
              </xs:annotation>
              <xs:union memberTypes="xs:date xs:dateTime" />
         </xs:simpleType>
    Even if it is a simpleType. I can't annotate to map to a TimeStamp with time zone... I should again... simpleTypes to create for each of the memberTypes in the union, annotate each of them to the card at Timestampt with time zone... then use these new simpleTypes in the union?

    Thanks for tips or advice!

    so if you use binary XML, you are stuck with what Oracle gives you? for example, the inlineData element is a string without terminals in the schema... Oracle maps to varchar2 (4000).

    No, binary XML stores data differently.

    Consider this simple example:

    SQL> begin
      2   dbms_xmlschema.registerSchema(
      3   schemaURL => 'test.xsd',
      4   schemaDoc => '
      5  
      6  
      7    
      8      
      9        
     10        
     11      
     12    
     13  
     14  ',
     15   local => true,
     16   genTypes => false,
     17   genTables => false,
     18   enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE,
     19   options => dbms_xmlschema.REGISTER_BINARYXML
     20   );
     21  end;
     22  /
    
    PL/SQL procedure successfully completed
    
    SQL> CREATE TABLE notes_table OF XMLTYPE
      2  XMLTYPE STORE AS binary xml
      3  XMLSCHEMA "test.xsd"
      4  ELEMENT "note"
      5  ;
    
    Table created
    
    SQL> insert into notes_table values(xmltype(
      2  '
      3  '||lpad(to_clob('X'),8000,'X')||'
      4  
    2011-11-16T11:56:23+01:00
    5
    ')); 1 row inserted SQL> select x.dt 2 , x.content 3 , length(x.content) 4 from notes_table t 5 , xmltable('/note' passing t.object_value 6 columns dt timestamp with time zone path 'dt' 7 , content clob path 'content' 8 ) x 9 ; DT CONTENT LENGTH(X.CONTENT) --------------------------------- -------------------------------------------------------------------------------- ----------------- 16/11/11 11:56:23,000000 +01:00 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 8000

    No problem by storing large chains.

  • Can you help me to get the time format to match the XML dateTime?

    XML has a dateTime format that looks like this:

    2002-10 - 10T 12: 00:00 - 05:00

    and Im using the XMLElement() functions in some queries to produce an xml document however it truncates the portions of time stored data is just MM/DD/YYYY.

    I would use a to_char function but I don't know what date format in Oracle to use to match the portion of zone at the end (-05:00) and how to make so that it can accept as 't' in there as a separator, as defined in the XML schema specification:

    http://www.w3.org/TR/xmlschema-2/

    Anyone know?

    Hello

    Trant says:
    XML has a dateTime format that looks like this:

    2002-10 - 10T 12: 00:00 - 05:00

    and Im using the XMLElement() functions in some queries to produce an xml document however it truncates the portions of time stored data is just MM/DD/YYYY.

    I would use a to_char function but I don't know what date format in Oracle to use to match the portion of zone at the end (-05:00) and how to make so that it can accept as 't' in there as a separator, as defined in the XML schema specification:

    http://www.w3.org/TR/xmlschema-2/

    Anyone know?

    Try something like

    SELECT     TO_CHAR ( SYSTIMESTAMP
              , 'YYYY-MM-DD"T"HH24:MI:SSTZH:TZM'
              )
    FROM     dual;
    

    The sample output:

    2011-07-25T15:50:12-04:00
    

    TO_CHAR function is described in the SQL language reference manual:
    http://download.Oracle.com/docs/CD/B28359_01/server.111/b28286/sql_elements004.htm#sthref396
    Search for "Date Format models" in the index.

    Put the mat (that is, fixed) text, for example the letter 'T', in the output, include it in double - quotes.
    TZH is the hours and TZM time zone format specifier is synonymous of zone Minutes.

  • Registering XML Schema error

    Hi team,

    The purpose of the mail of my project is to load data from the file in tables Oracle XML stream. I did it following the steps went perfectly well...

    I did following steps.

    (1) create the DIRECTORY xml_dir as 'c:\xmldata ';

    (2) create table xmltab XMLType;

    (3) following packages are carried out by schema 'Sys '.

    (1) dbmslob. SQL;
    (2) prvtlob. PLB;

    (4) a xmldata folder is created under "c:\". "and with data_file.xml file is stored in it.

    5) insert in xmltab values (XMLType (bfilename ('XML_DIR', 'data_file.xml'), nls_charset_id ('AL32UTF8')));

    When I try to run following select statement "No. lines selected" message; Although there is an element in the xml data file.

    SELECT OBJECT_VALUE
    FROM xmltab
    WHERE existsNode (OBJECT_VALUE, ' / ConsolidatedAssetHeader [AssetSourceSystem = "CAPS"]') = 1


    Now, I think that in order to use all functions like existsNode and exctractValue I have to save the schema in DB.

    This is the XML schema file.

    "< xsd: Schema targetNamespace =" "schemas-dart - com:sql:ConsolidatedAssetHeader" xmlns:schema = "schemas-dart - com:sql:ConsolidatedAssetHeader" container = "http://www.w3.org/2001/XMLSchema" xmlns:sqltypes = "http://schemas.microsoft.com/sqlserver/2004/sqltypes" elementFormDefault = "qualified" >
    < xsd: import namespace = "http://schemas.microsoft.com/sqlserver/2004/sqltypes" schemaLocation = "http://schemas.microsoft.com/sqlserver/2004/sqltypes/sqltypes.xsd" / >
    -< xsd: element name = "ConsolidatedAssetHeader" >
    -< xsd: complexType >
    -< xsd: SEQUENCE >
    < xsd: element name = "InternalId" type = "sqltypes:int" / >
    -< xsd: element name = "DCN" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "30" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    < xsd: element name = "EventDateLastChanged" type = "SqlTypes: DateTime" minOccurs = "0" / >
    -< xsd: element name = "FinancialStatusIndicator" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "InScopeIndicator" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationPriorityIndicator" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "PhysicalInstallDate" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetComment" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "255" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetContractExtension" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetContractNumber" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetDescription" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    < xsd: element name = "AssetFinancialInstallDate" type = "SqlTypes: DateTime" minOccurs = "0" / >
    < xsd: element name = "AssetFinancialRemovalDate" type = "SqlTypes: DateTime" minOccurs = "0" / >
    -< xsd: element name = "AssetFinancialStatus" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetName" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "255" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetParentSource" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetParentSourceID" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    < xsd: element name = "AssetPhysicalInstallDate" type = "SqlTypes: DateTime" minOccurs = "0" / >
    < xsd: element name = "AssetPhysicalRemovalDate" type = "SqlTypes: DateTime" minOccurs = "0" / >
    -< xsd: element name = "AssetPhysicalStatus" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetPhysicalStatusIndicator" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetSerialIndicator" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetSerialNumber" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetSource" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetSourceID" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetSourceIndicator" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetSourceSystem" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetSourceType" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetTag" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "BillabilityIndicator" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "InScopeFlag" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "IP address" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "NetworkNumber" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "SubnetAddress" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    < xsd: ELEMENT ref = "Schema: ConsolidatedAssetLocation" minOccurs = "0" maxOccurs = "unbounded" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    + < xsd: element name = "ConsolidatedAssetLocation" >
    -< xsd: complexType >
    -< xsd: SEQUENCE >
    < xsd: element name = "InternalId" type = "sqltypes:int" minOccurs = "0" / >
    < xsd: element name = "ParentId" type = "sqltypes:int" minOccurs = "0" / >
    -< xsd: element name = "AssetLocationIDBillTo" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetLocationIDShipTo" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetLocationIDSoldTo" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetSourceDt" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetSourceIDDt" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "AssetSourceSystemDt" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "ContractNumberExtensionDt" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationBillToAddress" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "150" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationBillToAddressLine2" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "150" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationBillToAddressLine3" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "150" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationBillToCity" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationBillToCountry" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationBillToAddressLine4" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "150" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationBillToState" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationBillToZip" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationPriorityIndicator" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationShipToAddress" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "150" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationShipToAddressLine2" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "150" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationShipToAddressLine3" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "150" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationShipToAddressLine4" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "150" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationShipToCity" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationShipToCountry" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationShipToState" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationShipToZip" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationSoldToAddress" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "150" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationSoldToAddressLine2" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "150" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationSoldToAddressLine3" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "150" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationSoldToAddressLine4" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "150" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationSoldToCity" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationSoldToCountry" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationSoldToState" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "LocationSoldToZip" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "PartySource" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    -< xsd: element name = "PartySourceID" minOccurs = "0" >
    -< xsd:simpleType >
    -xsd:restriction base = "sqltypes:nvarchar" sqltypes:localeId = "1033" sqltypes:sqlCompareOptions = "IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId = "52" >
    < xsd:maxLength value = "50" / >
    < / xsd:restriction >
    < / xsd:simpleType >
    < / xsd: element >
    < xsd: element name = "RowCreateDateTime" type = "SqlTypes: DateTime" minOccurs = "0" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < / xsd: Schema >

    I use the suite package registry scheme, which is in error

    BEGIN
    () DBMS_XMLSCHEMA.registerSchema
    "schemas-dart - com:sql:ConsolidatedAssetHeader',
    XDBURIType('http://schemas.microsoft.com/sqlserver/2004/sqltypes/sqltypes.xsd').getClob(),
    TRUE,
    TRUE,
    FAKE,
    (TRUE);
    END;

    Following error.

    BEGIN
    ERROR on line 1:
    ORA-31001: handle or path of the invalid resource name
    'http://schemas.microsoft.com/sqlserver/2004/sqltypes/sqltypes.xsd '.
    ORA-06512: at "SYS." XDBURITYPE", line 4
    ORA-06512: at line 2


    Can you please tell me what changes should I do to fix this error? Is there any specific location where should I put my schema file?
    Thanks in advance

    Murielle

    OK, finally, the missing piece of the puzzle! :)

    You do not actually use the schema that you have a hard time to register.
    Besides, only a fragment of the example document "temp.xml" conforms to the schema.

    So we're back to what said in the very first posts of this thread: question of the namespace, and also (now) incorrect XPath expressions.

    Try below example (no necessary schema):

    SQL> CREATE TABLE test_table OF XMLTYPE
      2  XMLTYPE STORE AS SECUREFILE BINARY XML;
    
    Table created
    
    SQL>
    SQL> INSERT INTO test_table
      2  VALUES(
      3   XMLType(bfilename('TEST_DIR','temp.xml'), nls_charset_id('AL32UTF16'))
      4  );
    
    1 row inserted
    
    SQL>
    SQL> SELECT x.*
      2  FROM test_table t,
      3       XMLTable(
      4        XMLNamespaces(default 'http://BAROutboundXML'),
      5        '/BAROutboundXML/Row/ConsolidatedAssetHeader'
      6        passing t.object_value
      7        columns InternalId number path 'InternalId',
      8                DCN        number path 'DCN'
      9       ) x
     10  WHERE x.InternalId = 1275
     11  ;
    
    INTERNALID        DCN
    ---------- ----------
          1275    1111111
     
    

    Since there are several elements of "ConsolidatedAssetHeader" by the document, you cannot use extractValue (because it works on a single node).
    XMLTable is used instead, so that each "ConsolidatedAssetHeader" is actually mapped to a line separated from the relational.

  • Load the XML file into Oracle external Table


    I load the data from the XML file into an intermediate table Oracle using external Tables.

    Let's say below, it is my XML file

    < header >
    < A_CNT > 10 < / A_CNT >
    < E_CNT > 10 < / E_CNT >
    < AF_CNT > 10 < / AF_CNT >
    < / header >
    < student >
    <>students-details
    < Student_info >
    < Single_Info >
    < ID > 18 / < ID >
    New York < City > < / City >
    < country > United States < / country >
    < Name_lst >
    < Student_name >
    Samuel < name > < / name >
    Paul < Last_name > < / Last_name >
    < DOB > 19871208 < / DOB >
    Aware of < RecordStatus > < / RecordStatus >
    < / Student_name >
    < Student_name >
    Samuel < name > < / name >
    Paul < Last_name > < / Last_name >
    < DOB > 19871208 < / DOB >

    < TerminationDt > 20050812 < / TerminationDt >
    History of < RecordStatus > < / RecordStatus >
    < / Student_name >
    < / Name_lst >
    < Personal_Info >
    <>men < / Type >
    < 27 > < / Age >
    < / Personal_Info >
    < / Single_Info >
    < / Student_info >

    < student - register >
    class < A >
    < info >
    < detail >
    < ID student > 18 < / student >
    EE < major > < / Major >
    < course-Grades >
    < course > VLSI < / course >
    < degree > 3.0 < / Grade >
    < / course-Grades >
    < course-Grades >
    < course > nanotechnology < / course >
    < degree > 4.0 < / Grade >
    < / course-Grades >
    < / details >
    < detail >
    < ID student > 18 < / student >
    THIS < major > < / Major >
    < / details >
    < / info >
    class < A >
    < Student_Enrol >
    <>students-details
    < student >

    I load this XML data file into a single table using an external Table. Could someone help me please with coding.

    Thank you

    Reva

    Could you please help me how to insert my XML content into that.

    Same as before, try a plain old INSERT:

    insert into xml_pecos

    values)

    XmlType (bfilename ('XML_DIR', "test.xml"), nls_charset_id ('AL32UTF8'))

    );

    But you'll probably hit the same limitation as with the binary XMLType table.

    In this case, you can use FTP to load the file as a resource in the XML DB repository.

    If the XML schema has been registered with the hierarchy enabled then the file will be automatically inserted into the table.

    Could you post the exact statement that you used to save the scheme?

    In the meantime, you can also read this article, I did a few years ago, it covers the XML DB features that may be useful here, including details on how to load the file via FTP:

    https://odieweblog.WordPress.com/2011/11/23/Oracle-XML-DB-a-practical-example/

    And documentation of the course: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb06stt.htm#ADXDB4672

  • ODI, working with the XML source file

    Hi ODI Experts.

    I work in an ODI project for which source is an XML file and the target is Oracle table.
    I am able to reverse engineer the source XML model by placing the XML file on the local DRIVE.
    I created the interface and made the map with the target.
    During execution of the interface, the insert is peroperly happening.

    In a real scenario, my XML file should be placed in a local SERVER (and not in the local drives).
    If that I could go back, I've done the JDBC to point to the directory on the server (instead of local disk path).

    When I run the interface she inserts the same set of records that have been placed in the previous step, the latest data from file.
    I tried to delete the file in both server and local drive, and the interface is represented.
    Then it was also inserted the same set of data (instead of giving error file not present in the path).

    Not sure where it takes the file and insert the data.

    Any valuable contribution on this would help a lot.

    I think what is happening here is that ODI retrieves the data stored in the XML schema when running the interface again.

    Try truncating the XML schema before running the interface that loads data into the table, order below, this can be understood as a procedural step before calling the interface.

    B.4.11 TRUNCATION SCHEME
    Clears all data current schema, or .

    TRUNCATE the SCHEMA []

    http://docs.Oracle.com/CD/E17904_01/integrate.1111/e12644/appendix_xml_driver.htm#CHDEEGHJ

    I hope this helps.

    Kind regards
    Rickson Lewis

Maybe you are looking for