XML data 32K into CLOB

Hi all,
I am trying to use UTL_FILE.PUT_LINE to output an XML file. This xml file is the result of a select query. Hence converting the result of the select query into xml format using dbms_xmlgen.getxml and storing it in a variable. But the resultant xml data > 32k . What would be the best way to store it in variable? When using CLOB datatype, getting a numeric value error.
Thanks in advance.

As you didn't post the code, nor included a four digit database version, you are asking someone to look in a crystal ball.
Sorry, they are out for repair.
Also the XDB forum would be more appropriate.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • How to read XML data stored in CLOB in Concurrent prog Output

    Hi All,
    I'm trying to Generate the XML Data as concurrent Program output. I have a PL/SQL package which generated the XML data by using SQL/XML functions. I'm storing the generated XML data in a CLOB variable. But when i try to read the data using fnd_file.put_line(fnd_file.OUTPUT,XML_Data) it doesn't display data more than 32767 bytes.
    Please help me out to understand what could be done to read the data in chunks. I have tried many logic's to print chunks of data but the output tags are either chopped off and errors out saying Tag not found.
    My logic is as below:
    v_handler:= DBMS_XMLGEN.newContext(v_xml_query);
    --Sets NULL handling options
    DBMS_XMLGen.SetNullHandling(v_handler, dbms_xmlgen.EMPTY_TAG ) ;
    --Set special character handling
    DBMS_XMLGEN.setConvertSpecialChars(v_handler, TRUE);
    -- Specified whether to use an XML attribute to indicate NULLness of particular entity in the XML document
    DBMS_XMLGen.useNullAttributeIndicator(v_handler,TRUE);
    -- set Checking invalid chars
    DBMS_XMLGEN.setCheckInvalidChars(v_handler, TRUE);
    -- get the xml data as required
    v_xml_data:= DBMS_XMLGEN.getXMLtype(v_handler);
    SELECT XMLROOT(v_xml_data.extract('/*'),VERSION '1.0').getClobVal() into v_new_xml_Data from dual;
    -- get the length of the xml generated
    v_clob_len := dbms_lob.getlength(v_new_xml_Data);
    FND_FILE.PUT_LINE(FND_FILE.LOG,'The Clob length is :'|| v_clob_len);
    -- logic to process string more than 32767 Processing by each character
    v_offset :=1;
    while (v_offset <= v_clob_len)
    LOOP
    v_char := dbms_lob.substr(v_new_xml_Data, 1, v_offset);
    IF (v_char = CHR(10))
    then
    fnd_file.new_line(fnd_file.output, 1);
    else
    fnd_file.put(fnd_file.output, v_char);
    end if;
    v_offset := v_offset + 1;
    END LOOP;
    FND_FILE.PUT_LINE(FND_FILE.LOG,'The offset is :'|| v_offset);
    FND_FILE.NEW_LINE(FND_FILE.OUTPUT, 1);
    THe above logic is for character by character which is a performance burden? Please let me know if there is any other work around for this

    Hi,
    Thanks for Replying. I have refered http://blog.oraclecontractors.com/?p=69 and then i added that piece of code. Basically, i'm trying to generate a report using XML publisher. To generate the XML data i'm writing a pl/sql package with SQl/XML functions. DBMS_XMLGEN would help me convert the XML Data as is. When the concurrent program runs this XML data will merge with RTF layout and generate required report. I'm able to generate the Report for data less then 32767 bytes. More than the limit i need to pass chunks of XML data to read as output. That's the reason i'm using fnd_file.output. But it reads only 32767 size at a time.
    WHen i use the given logic, it works perfectly fine, but it loops for each character, for example if you have 30,000 characters it loops the same, which is peformance burden.
    So i tried to write the logic of chunks but still i get the error that XML tag is not found or missing. I'm hoping this is very common issue, but after all my trails, i didn't find the right solution.
    the other logic i tried was :
    v_new_xml_data varchar2(32767)
    v_iterations := CEIL(v_clob_len/v_chunk_length); -- v_chunk_length is 32767 and v_clob_length is length of the XML data stored inthe clob variable
    For i in 0..v_iterations
    LOOP
    FND_FILE.put_line (fnd_file.log,'the loops v_pos :'||i||' and v_clob_length :'||v_clob_len);
    v_new_xml_data := DBMS_LOB.SUBSTR ( V_XML_DATA,v_chunk_length,(i*v_chunk_length)+1);
    FND_FILE.PUT_LINE (FND_FILE.OUTPUT,v_new_xml_data); -- read the output for every 32767 chunks
    FND_FILE.PUT_LINE(FND_FILE.LOG, 'Chunk length is :'||((i*v_chunk_length)+1));
    END LOOP;
    FND_FILE.put_line (fnd_file.log,'out of loop');
    FND_FILE.put_line (fnd_file.log,'length of new xml is '||v_clob_len);
    Please, let me know if you need Further clarifications on the same.

  • Update XML data stored in CLOB Column

    Hi All,
    i am new to Oracle and new to SQL
    i am trying to update XML data stored in CLOB cloumn,data is stored with the follwoing format
    <attrs><attr name="name"><string>Schade</string></attr></attrs>
    i am using the following query for updating the value
    UPDATE PRODUCT p SET ATTRIBUTES_nl_nl=UPDATEXML(XMLTYPE.createXML(ATTRIBUTES_nl_nl),'/attrs/attr[@name="name"]/string/text()','Schade').getClobVal() WHERE p.sku='000000000000040576_200911-5010057'
    this query is working fine but it changing the data to the following format
    <attrs><attr name="name">Schade</attr></attrs>
    some how it is ommiting the <string> tag from it, i am unable to figure it out whats the reason.
    any help in this regard will b e much appriciated
    Thanks in Advance
    -Umesh

    Hi,
    You should have created your own thread for this, and included database version.
    This works for me on 11.2.0.2 and 10.2.0.5 :
    SQL> create table t_org ( xml_clob clob );
    Table created
    SQL>
    SQL> insert into t_org
      2  values(
      3  '<Message>
      4  <Entity>
      5  <ASSIGNMENT>
      6  <OAVendorLocation> </OAVendorLocation>
      7  <Vendorid>1</Vendorid>
      8  </ASSIGNMENT>
      9  </Entity>
    10  </Message>'
    11  );
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    SQL> update t_org set xml_clob =
      2  updatexml(xmltype(xml_clob),
      3  '/Message/Entity/ASSIGNMENT/OAVendorLocation/text()','LONDON').getClobVal()
      4  ;
    1 row updated
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    *LONDON*
    Does the OAVendorLocation really have a whitespace value?
    If not then it's expected behaviour, you're trying to update a text() node that doesn't exist. In this case, the solution is to use appendChildXML to create the text() node, or update the whole element.
    Is it your real document? Do you actually have some namespaces?

  • Importing XML Data Back into the Form

    I have a form that shows several subforms based on the selections the user has made while filling in the form. This is working quite well but when I import the XML data back into the form it doesn't show the subforms that have been used.
    Is there an easy way to change this?
    Thanks in advance!
    Emma

    Actually the issue may actually have to do with the fact that the connections aren't bound, but I haven't seen the data.
    I have some fairly complex forms that include both subforms and instances, have an XSD embedded and export as XML. When I import the data, everythi
    Now, that being said...
    Are your subforms "hidden" and you opt to display them upon selection of a radio button for example, or do you SetInstances()? If you're using visible=TRUE or FALSE, that may also cause some issues.
    Try this -- on Form:ready try this code:
    if(this.rawValue == "on"){ //this radio button 1
    _subform1.setInstances(1);
    _subform2.setInstances(0);
    _subform3.setInstances(0);
    else if(this.rawValue == "on"){ //this radio button 1
    _subform1.setInstances(0);
    _subform2.setInstances(1);
    _subform3.setInstances(0);
    else if(this.rawValue == "on"){ //this radio button 1
    _subform1.setInstances(0);
    _subform2.setInstances(0);
    _subform3.setInstances(1);
    else { // this is fisrt time open -- i sometimes had issues with subforms being visible on first entry
    _subform1.setInstances(0);
    _subform2.setInstances(0);
    _subform3.setInstances(0);
    Then on:Click essentially copy most of the code you put in form:ready
    if(this.rawValue == "on"){ //this radio button 1
    _subform1.setInstances(1);
    _subform2.setInstances(0);
    _subform3.setInstances(0);
    else if(this.rawValue == "on"){ //this radio button 1
    _subform1.setInstances(0);
    _subform2.setInstances(1);
    _subform3.setInstances(0);
    else if(this.rawValue == "on"){ //this radio button 1
    _subform1.setInstances(0);
    _subform2.setInstances(0);
    _subform3.setInstances(1);
    Of course this will go on top of your radio button group.
    If you are exporting to XML, it will make your life a whole lot easier, by the way, to import an XSD and bind your nodes, especially as your forms and data start to get more complex.
    Finally, you may also know this but -- unless you have Forms Server, any user that wants to export the data or import the data will need to have at least full Acrobat Professional. If you want people to be able to save data in the form but import/export isn't that important, they will need to have full Acrobat.
    I hope that helps a bit. Good luck!
    Lisa

  • XML Data Load into releational structures

    Hi,
    I am very unexperienced in using XML and have the problem
    to import very large XML data files into existing reletional structures.
    In our production DB we don't use the java engine, so
    that PL/SQL an the SQL Loader are the only available ways to import the data.
    At the moment we get flat files and use the SQL Loader utility. But an interface to a new system send XML data now and I have to fill the same old releational structure with the new data.
    Can anybody give me a hint about the best technic for an high performance import. Are there any existing tools for the relational mapping?
    Regards Ralph

    Thank you for your reply.
    You are right. We only want to break the XML to fill our relational structures. We don't need the XML data further on. But we have to load the data in temporary structures, because we have to transform the data in our own format. (The system which delivers the XML data is external and uses another data model)
    Is there no more elegant way with use of databse built in technics? The XML data we get can be validated against a XML schema.
    So I thought, it could be a way to load the XML in the XDB and register the schema in the database. After that store the XML data in the default generated object relational structures and then programm the data transformation and the data flow between these default structures to our target data structures with PL/SQL.
    I don't know if this way is performant enough.
    If I use an external tool i have to code the relational mapping outside the database and insert the data with use of ODBC in temporary structures which i have to create manualy.
    So I hoped to find a way to load the data in any relational structure using the advantages of XML and XML schema and code the neccasary logic inside the DB.
    Do you have any further hints for my problem?
    Regards Ralph

  • Trying to Insert an XML Element into XML data stored in CLOB column

    Hi all,
    My ORACLE DB version is:
    ('Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production');
    ('PL/SQL Release 11.2.0.2.0 - Production');
    ('CORE 11.2.0.2.0 Production');
    ('TNS for Linux: Version 11.2.0.2.0 - Production');
    ('NLSRTL Version 11.2.0.2.0 - Production');
    I have this XML data stored in a CLOB column:
    <Activity>
         <Changes>     
         </Changes>
         <Inserts>     
         </Inserts>
         <Definition>     
         </Definition>
         <Assignment TYPE="Apply">     
         </Assignment>
         <Spawned>
              <Activity>576D8CD9-57A1-8608-1563-8F6DC74BDF3C</Activity>
              <Activity>11226E79-5D24-02EB-A950-D34A9CCFB3FF</Activity>
              <Activity>DAA68DC0-CA9A-BB15-DE31-9596E19513EE</Activity>
              <Activity>93F667D6-966A-7EAD-9B70-630D9BEFDDD2</Activity>
              <Activity>FA63D9D3-86BB-3FF0-BE69-17EAA7581637</Activity>
         </Spawned>
         <SpawnedBy>AFC49BD4-5AA7-38C0-AE27-F59D16EE1B1C</SpawnedBy>
    </Activity>
    I am in need of some assistance in creating an update that will insert another <Activity>SomeGUID</Activity> into the <Spawned> parent.
    Any help is greatly appreciated.
    Thanks.
    Edited by: 943783 on Dec 14, 2012 12:58 PM

    See XML updating functions : http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb04cre.htm#i1032611
    For example :
    UPDATE my_table t
    SET t.my_clob =
          XMLSerialize(document
            insertChildXML(
              XMLParse(document t.my_clob)
            , '/Activity/Spawned'
            , 'Activity'
            , XMLElement("Activity", 'Some GUID')
    WHERE ...
    ;Although it works, there's overhead introduced by parsing the CLOB, then serializing again.
    Is there any chance you can change the CLOB to SECUREFILE binary XMLType storage instead?
    You would then be able to benefit from optimized piecewise update of the XML and improved storage.

  • How to read XML Data stored as Clob

    Hi
    I am new to clob & XML types...
    An XML data has been inserted into a Clob field in a Oracle(9.2.0.8.0) Table
    CREATE TABLE TEMP
    SNO NUMBER(5),
    STR_VAL LONG,
    CREATED_DT DATE DEFAULT sysdate,
    COL2 CLOB,
    COL3 SYS.XMLTYPE
    SELECT dbms_lob.getlength(col2) from temp
    ->24754
    SQL> select col2 from temp;
    COL2
    &lt;DataSet1&gt;
    &lt;TAGSDATATABLE&gt;
    &lt;TAG_NAME&gt;KST20001&lt;/TAG_NA
    If i use the above stmt it shows only pice of data
    how can i get the actual data from this column.
    could anyone help to get the data.
    Regards
    Prakash
    Edited by: user12957183 on Aug 25, 2010 12:25 AM

    Insert data in to XMLTYPE table from clob variable:
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2  my_clob CLOB := '<DataSet1><TAGSDATATABLE><TAG_NAME>KST20001</TAG_NAME>
      3  </TAGSDATATABLE><TAGSDATATABLE><TAG_NAME>KST20002</TAG_NAME></TAGSDATATABLE>
      4  <TAGSDATATABLE><TAG_NAME>KST20003</TAG_NAME></TAGSDATATABLE>
      5  <TAGSDATATABLE>
      6  <TAG_NAME>KST20004</TAG_NAME>
      7  </TAGSDATATABLE>
      8  <TAGSDATATABLE>
      9  <TAG_NAME>KST20005</TAG_NAME>
    10  </TAGSDATATABLE>
    11  <TAGSDATATABLE>
    12  <TAG_NAME>KST20006</TAG_NAME>
    13  </TAGSDATATABLE>
    14  <TAGSDATATABLE>
    15  <TAG_NAME>KST20007</TAG_NAME>
    16  </TAGSDATATABLE>
    17  <TAGSDATATABLE>
    18  <TAG_NAME>KST20008</TAG_NAME>
    19  </TAGSDATATABLE>
    20  <TAGSDATATABLE>
    21  <TAG_NAME>KST20009</TAG_NAME>
    22  </TAGSDATATABLE>
    23  <TAGSDATATABLE>
    24  <TAG_NAME>KST20010</TAG_NAME>
    25  </TAGSDATATABLE>
    26  <TAGSDATATABLE>
    27  <TAG_NAME>KST20009</TAG_NAME>
    28  </TAGSDATATABLE>
    29  </DataSet1>';
    31  BEGIN
    33  INSERT INTO my_tab1 VALUES(XMLTYPE(my_clob));
    34* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> desc my_tab1;
    Name                                                                                                                  
    TABLE of XMLTYPE
    SQL>
    -- For larger data:
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2  my_clob CLOB := '<DataSet1>
      3  <TAGSDATATABLE>
      4  <TAG_NAME>KST20001</TAG_NAME>
      5  </TAGSDATATABLE>
      6  <TAGSDATATABLE>
      7  <TAG_NAME>KST20002</TAG_NAME>
      8  </TAGSDATATABLE>
      9  <TAGSDATATABLE>
    10  <TAG_NAME>KST20003</TAG_NAME>
    11  </TAGSDATATABLE>
    12  <TAGSDATATABLE>
    13  <TAG_NAME>KST20004</TAG_NAME>
    14  </TAGSDATATABLE>
    15  <TAGSDATATABLE>
    16  <TAG_NAME>KST20005</TAG_NAME>
    17  </TAGSDATATABLE>
    18  <TAGSDATATABLE>
    19  <TAG_NAME>KST20006</TAG_NAME>
    20  </TAGSDATATABLE>
    21  <TAGSDATATABLE>
    22  <TAG_NAME>KST20007</TAG_NAME>
    23  </TAGSDATATABLE>
    24  <TAGSDATATABLE>
    25  <TAG_NAME>KST20008</TAG_NAME>
    26  </TAGSDATATABLE>
    27  <TAGSDATATABLE>
    28  <TAG_NAME>KST20009</TAG_NAME>
    29  </TAGSDATATABLE>
    30  <TAGSDATATABLE>
    31  <TAG_NAME>KST20010</TAG_NAME>
    32  </TAGSDATATABLE>
    33  <TAGSDATATABLE>
    34  <TAG_NAME>KST20009</TAG_NAME>
    35  </TAGSDATATABLE>
    36  <TAGSDATATABLE>
    37  <TAG_NAME>KST20009</TAG_NAME>
    38  </TAGSDATATABLE>
    39  <TAGSDATATABLE>
    40  <TAG_NAME>KST20009</TAG_NAME>
    41  </TAGSDATATABLE>
    42  <TAGSDATATABLE>
    43  <TAG_NAME>KST20009</TAG_NAME>
    44  </TAGSDATATABLE>
    45  <TAGSDATATABLE>
    46  <TAG_NAME>KST20010</TAG_NAME>
    47  </TAGSDATATABLE>
    48  <TAGSDATATABLE>
    49  <TAG_NAME>KST20009</TAG_NAME>
    50  </TAGSDATATABLE>
    51  <TAGSDATATABLE>
    52  <TAG_NAME>KST20009</TAG_NAME>
    53  </TAGSDATATABLE>
    54  <TAGSDATATABLE>
    55  <TAG_NAME>KST20009</TAG_NAME>
    56  </TAGSDATATABLE>
    57  <TAGSDATATABLE>
    58  <TAG_NAME>KST20009</TAG_NAME>
    59  </TAGSDATATABLE>
    60  <TAGSDATATABLE>
    61  <TAG_NAME>KST20010</TAG_NAME>
    62  </TAGSDATATABLE>
    63  <TAGSDATATABLE>
    64  <TAG_NAME>KST20009</TAG_NAME>
    65  </TAGSDATATABLE>
    66  <TAGSDATATABLE>
    67  <TAG_NAME>KST20009</TAG_NAME>
    68  </TAGSDATATABLE>
    69  <TAGSDATATABLE>
    70  <TAG_NAME>KST20009</TAG_NAME>
    71  </TAGSDATATABLE>
    72  <TAGSDATATABLE>
    73  <TAG_NAME>KST20009</TAG_NAME>
    74  </TAGSDATATABLE>
    75  <TAGSDATATABLE>
    76  <TAG_NAME>KST20010</TAG_NAME>
    77  </TAGSDATATABLE>
    78  <TAGSDATATABLE>
    79  <TAG_NAME>KST20009</TAG_NAME>
    80  </TAGSDATATABLE>
    81  <TAGSDATATABLE>
    82  <TAG_NAME>KST20009</TAG_NAME>
    83  </TAGSDATATABLE>
    84  <TAGSDATATABLE>
    85  <TAG_NAME>KST20009</TAG_NAME>
    86  </TAGSDATATABLE>
    87  <TAGSDATATABLE>
    88  <TAG_NAME>KST20009</TAG_NAME>
    89  </TAGSDATATABLE>
    90  <TAGSDATATABLE>
    91  <TAG_NAME>KST20010</TAG_NAME>
    92  </TAGSDATATABLE>
    93  <TAGSDATATABLE>
    94  <TAG_NAME>KST20009</TAG_NAME>
    95  </TAGSDATATABLE>
    96  <TAGSDATATABLE>
    97  <TAG_NAME>KST20009</TAG_NAME>
    98  </TAGSDATATABLE>
    99  <TAGSDATATABLE>
    100  <TAG_NAME>KST20009</TAG_NAME>
    101  </TAGSDATATABLE>
    102  <TAGSDATATABLE>
    103  <TAG_NAME>KST20009</TAG_NAME>
    104  </TAGSDATATABLE>
    105  <TAGSDATATABLE>
    106  <TAG_NAME>KST20010</TAG_NAME>
    107  </TAGSDATATABLE>
    108  <TAGSDATATABLE>
    109  <TAG_NAME>KST20009</TAG_NAME>
    110  </TAGSDATATABLE>
    111  <TAGSDATATABLE>
    112  <TAG_NAME>KST20009</TAG_NAME>
    113  </TAGSDATATABLE>
    114  <TAGSDATATABLE>
    115  <TAG_NAME>KST20009</TAG_NAME>
    116  </TAGSDATATABLE>
    117  <TAGSDATATABLE>
    118  <TAG_NAME>KST20009</TAG_NAME>
    119  </TAGSDATATABLE>
    120  <TAGSDATATABLE>
    121  <TAG_NAME>KST20010</TAG_NAME>
    122  </TAGSDATATABLE>
    123  <TAGSDATATABLE>
    124  <TAG_NAME>KST20009</TAG_NAME>
    125  </TAGSDATATABLE>
    126  <TAGSDATATABLE>
    127  <TAG_NAME>KST20009</TAG_NAME>
    128  </TAGSDATATABLE>
    129  <TAGSDATATABLE>
    130  <TAG_NAME>KST20009</TAG_NAME>
    131  </TAGSDATATABLE>
    132  <TAGSDATATABLE>
    133  <TAG_NAME>KST20009</TAG_NAME>
    134  </TAGSDATATABLE>
    135  <TAGSDATATABLE>
    136  <TAG_NAME>KST20010</TAG_NAME>
    137  </TAGSDATATABLE>
    138  <TAGSDATATABLE>
    139  <TAG_NAME>KST20009</TAG_NAME>
    140  </TAGSDATATABLE>
    141  <TAGSDATATABLE>
    142  <TAG_NAME>KST20009</TAG_NAME>
    143  </TAGSDATATABLE>
    144  <TAGSDATATABLE>
    145  <TAG_NAME>KST20009</TAG_NAME>
    146  </TAGSDATATABLE>
    147  </DataSet1>';
    148  l_xmltype xmltype;
    149  BEGIN
    150  --l_xmltype := my_clob;
    151  INSERT INTO my_tab1 VALUES(XMLTYPE(my_clob));
    152* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> Edited by: AP on Aug 25, 2010 4:46 AM

  • Query xml data from a CLOB datatye

    All,
    I read in an oracle white paper that is is possible to query XML data from CLOB datatype using oracle text index using operators HASPATH() and INPATH(). I am not able to find any example on how to do this. Can someone please post a simple example here.
    Thank You very much!

    SCOTT@10gXE> CREATE TABLE your_table (id NUMBER, xml_data CLOB)
      2  /
    Table created.
    SCOTT@10gXE> INSERT INTO your_table (id, xml_data)
      2  SELECT t.deptno,
      3           DBMS_XMLGEN.GETXML
      4             ('SELECT d.dname,
      5                   CURSOR (SELECT e.ename, e.job
      6                        FROM   emp e
      7                        WHERE  e.deptno = d.deptno) emp_data
      8            FROM   dept d
      9            WHERE  d.deptno = ' || t.deptno)
    10  FROM   dept t
    11  /
    5 rows created.
    SCOTT@10gXE> COMMIT
      2  /
    Commit complete.
    SCOTT@10gXE> begin
      2    ctx_ddl.create_section_group('xmlpathgroup', 'PATH_SECTION_GROUP');
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> CREATE INDEX myindex
      2  ON your_table(xml_data)
      3  INDEXTYPE IS ctxsys.context
      4  PARAMETERS ('datastore ctxsys.default_datastore
      5              filter ctxsys.null_filter
      6              section group xmlpathgroup'
      7            )
      8  /
    Index created.
    SCOTT@10gXE> SELECT * FROM your_table
      2  WHERE  CONTAINS (xml_data, 'PERSONNEL INPATH (//DNAME)') > 0
      3  /
            ID XML_DATA
            50 <?xml version="1.0"?>
               <ROWSET>
                <ROW>
                 <DNAME>PERSONNEL</DNAME>
                 <EMP_DATA>
                 </EMP_DATA>
                </ROW>
               </ROWSET>
    SCOTT@10gXE> SELECT * FROM your_table
      2  WHERE  CONTAINS (xml_data, 'HASPATH (//DNAME="PERSONNEL")') > 0
      3  /
            ID XML_DATA
            50 <?xml version="1.0"?>
               <ROWSET>
                <ROW>
                 <DNAME>PERSONNEL</DNAME>
                 <EMP_DATA>
                 </EMP_DATA>
                </ROW>
               </ROWSET>
    SCOTT@10gXE> SELECT * FROM your_table
      2  WHERE  CONTAINS (xml_data, 'CLARK INPATH (//ENAME)') > 0
      3  /
            ID XML_DATA
            10 <?xml version="1.0"?>
               <ROWSET>
                <ROW>
                 <DNAME>ACCOUNTING</DNAME>
                 <EMP_DATA>
                  <EMP_DATA_ROW>
                   <ENAME>CLARK</ENAME>
                   <JOB>MANAGER</JOB>
                  </EMP_DATA_ROW>
                  <EMP_DATA_ROW>
                   <ENAME>KING</ENAME>
                   <JOB>PRESIDENT</JOB>
                  </EMP_DATA_ROW>
                  <EMP_DATA_ROW>
                   <ENAME>MILLER</ENAME>
                   <JOB>CLERK</JOB>
                  </EMP_DATA_ROW>
                 </EMP_DATA>
                </ROW>
               </ROWSET>
    SCOTT@10gXE> SELECT * FROM your_table
      2  WHERE  CONTAINS (xml_data, 'HASPATH (//ENAME="CLARK")') > 0
      3  /
            ID XML_DATA
            10 <?xml version="1.0"?>
               <ROWSET>
                <ROW>
                 <DNAME>ACCOUNTING</DNAME>
                 <EMP_DATA>
                  <EMP_DATA_ROW>
                   <ENAME>CLARK</ENAME>
                   <JOB>MANAGER</JOB>
                  </EMP_DATA_ROW>
                  <EMP_DATA_ROW>
                   <ENAME>KING</ENAME>
                   <JOB>PRESIDENT</JOB>
                  </EMP_DATA_ROW>
                  <EMP_DATA_ROW>
                   <ENAME>MILLER</ENAME>
                   <JOB>CLERK</JOB>
                  </EMP_DATA_ROW>
                 </EMP_DATA>
                </ROW>
               </ROWSET>
    SCOTT@10gXE>

  • How to formulate SQL that need to use some XML data in a clob?

    Hi,
    We just created a new 8i table that has some regular fields as well as a clob field that contains XML data. How could I bring back the value of a spcific element in the XML field and compare it against a regular field? For example, I want to make sure the value in field A is not the same as the value of a specific element in field b. Your help is very much appreciated.
    select * from X
    where X.a <> X.b.elementZ

    Depending on how complex your XML data is, you can write a simple function that does a string search of the CLOB and returns the value of the tag you are looking at. Then you can compare the value of the tag and the value of the the column.
    select * from X
    where x.a <> getTagValue(X.b,'elementZ')
    Check out the DBMS_LOB package.

  • How to send large amount of XML data in one CLOB variable

    Hi,
    I am sending large amount of XML data to TCP/IP port in one CLOB variable.
    My requirement is to send the whole data in one go in one CLOB variable.
    But that CLOB variable is not sufficient to hold all the data.
    Please suggest some solution.
    Thanks in advance

    Hi Here is my code:
    CREATE OR REPLACE PACKAGE BODY APPS.XXMB_WIP_PROD_TAG_DOOR_PKG
    AS
    PROCEDURE xxmb_get_xml_data_1270 (
    -- errbuf OUT VARCHAR2,
    -- retcode OUT NUMBER,
    p_org IN VARCHAR2,
    p_limit_to_global IN VARCHAR2,
    p_label IN VARCHAR2,
    p_printer IN VARCHAR2,
    p_quantity IN VARCHAR2,
    p_print_method IN VARCHAR2,
    p_enable_release IN VARCHAR2,
    p_enable_serial_no IN VARCHAR2,
    p_release IN VARCHAR2,
    p_rep_group IN VARCHAR2,
    p_cart_type IN VARCHAR2,
    p_cart_no_from IN VARCHAR2,
    p_cart_no_to IN VARCHAR2,
    p_serial_no IN VARCHAR2
    AS
    CURSOR c_xml_data_door (
    p_org IN VARCHAR2,
    p_label IN VARCHAR2,
    p_printer IN VARCHAR2,
    p_quantity IN VARCHAR2,
    p_print_method IN VARCHAR2,
    p_rep_group IN VARCHAR2,
    p_release IN VARCHAR2,
    p_cart_type IN VARCHAR2,
    p_cart_no_from IN VARCHAR2,
    p_cart_no_to IN VARCHAR2,
    p_serial_no IN VARCHAR2
    IS
    SELECT xxasa.item_id AS item_id, xcs.serial_number AS serial_number,xxcpf.cart_type,xcs.destination_cart_num cart,xcs.destination_slot_num slot
    CURSOR c_product_detail (
    l_product IN NUMBER,
    l_serial_num IN VARCHAR2,
    p_limit_to_global IN VARCHAR2
    IS
    SELECT xcra_specie.reference_id AS reference_id,
    xcra_ege.attribute_value AS ege, xcs.item_id AS item_id,
    AND msib.inventory_item_id = l_product
    and xcs.organization_id = nvl(p_org, xcs.organization_id)
    AND xcs.serial_number = NVL (l_serial_num, xcs.serial_number);
    /*-------------------------------------------------------+
    | Cursor to fetch the data for special Message Label |
    +-------------------------------------------------------*/
    CURSOR c_count (p_item_id IN NUMBER)
    IS
    SELECT xcrav.attribute_value, xcs.serial_number, xcs.cabinet_number
    FROM xxmb_czmfg_ref_attributes xcrav,
    cz_config_attributes cca,
    AND msib.organization_id = xcs.organization_id
    AND msib.inventory_item_id = xcs.item_id;
    /*--------------------------+
    | Common variables |
    +--------------------------*/
    v_limit_to_global VARCHAR2 (100);
    l_label_count NUMBER := 1;
    total_rec NUMBER;
    l_rewrite VARCHAR2 (1) := 'N';
    l_file_count NUMBER := 1;
    l_separate_line VARCHAR2 (10);
    BEGIN
    fnd_profile.get ('WMS_LABEL_OUTPUT_DIRECTORY', l_output_dir);
    fnd_profile.get ('WMS_LABEL_FILE_PREFIX', l_output_file_prefix);
    l_request_id := apps.fnd_global.conc_request_id;
    l_output_file_name :=
    l_output_file_prefix || l_request_id || l_file_end;
    l_dir_seperator := '/';
    IF (INSTR (l_output_dir, l_dir_seperator) = 0)
    THEN
    l_dir_seperator := '\';
    END IF;
    v_label := p_label;
    v_printer := p_printer;
    v_quantity := p_quantity;
    V_LIMIT_TO_GLOBAL := P_LIMIT_TO_GLOBAL;
    L_XML_CONTENT := '<?xml version="1.0" encoding="UTF-8" ?>';
    L_XML_CONTENT := L_XML_CONTENT || '<!DOCTYPE labels SYSTEM "label.dtd">';
    L_XML_CONTENT := L_XML_CONTENT || '<labels>';
    FOR r_xml_data_door IN c_xml_data_door (p_org,
    p_label,
    p_printer,
    p_quantity,
    p_print_method,
    p_rep_group,
    p_release,
    p_cart_type,
    p_cart_no_from,
    p_cart_no_to,
    p_serial_no
    LOOP
    -- dbms_output.put_line ( 1 );
    FOR r_product_detail IN
    c_product_detail (r_xml_data_door.item_id,
    r_xml_data_door.serial_number,
    v_limit_to_global
    LOOP
    -- dbms_output.put_line ( 2 );
    -- l_xml_content := '<?xml version="1.0" encoding="UTF-8" ?>';
    -- l_xml_content := l_xml_content || '<!DOCTYPE labels SYSTEM "label.dtd">';
    -- l_xml_content := l_xml_content || '<labels>';
    fnd_file.put_line (fnd_file.LOG, 'label cnt: ' || l_label_count);
    dbms_output.put_line (l_label_count);
    L_XML_CONTENT := L_XML_CONTENT || '<label _FORMAT='
    || '"'
    || 'lib://FRD/'
    || v_label
    || '"'
    || ' _PRINTERNAME='
    || '"'
    || v_printer
    || '"'
    || ' _QUANTITY='
    || '"'
    || v_quantity
    || '"'
    || '>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Color">'
    || R_PRODUCT_DETAIL.COLOR
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT ||'<variable name= "Model">'
    || R_PRODUCT_DETAIL.model
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Build_Date">'
    || R_PRODUCT_DETAIL.BUILD_DATE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Assy_Cart">'
    || R_PRODUCT_DETAIL.ASSY_CART
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Assy_Slot">'
    || R_PRODUCT_DETAIL.ASSY_SLOT
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Assy_Line">'
    || R_PRODUCT_DETAIL.ASSY_LINE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Finish_Cart">'
    || R_PRODUCT_DETAIL.FINISH_CART
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Finish_Slot">'
    || R_PRODUCT_DETAIL.FINISH_SLOT
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Serial_Number">'
    || R_PRODUCT_DETAIL.SERIAL_NO
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Serial_Number_Barcode">'
    || R_PRODUCT_DETAIL.SERIAL_NO
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Specie">'
    || R_PRODUCT_DETAIL.SPECIE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT ||'<variable name= "Truck_Group">'
    || R_PRODUCT_DETAIL.TRUCK_GROUP
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Label_Sequence_No">'
    || L_LABEL_COUNT
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT ||'<variable name= "WIP_Cart">'
    || R_PRODUCT_DETAIL.WIP_CART
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "WIP_Slot">'
    || R_PRODUCT_DETAIL.WIP_SLOT
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Cabinet_Sequence_No">'
    || R_PRODUCT_DETAIL.CAB_SEQ_NO
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "RAW_PART_NO">'
    || R_PRODUCT_DETAIL.RAW_PART_NO
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "JC">'
    || R_PRODUCT_DETAIL.JC
    || '</variable>' ;
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "QC">'
    || R_PRODUCT_DETAIL.QC
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Thickness">'
    || R_PRODUCT_DETAIL.THICKNESS
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Width">'
    || R_PRODUCT_DETAIL.width
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Length">'
    || R_PRODUCT_DETAIL.length
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Overlay">'
    || R_PRODUCT_DETAIL.OVERLAY
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Options">'
    || R_PRODUCT_DETAIL.OPTIONS
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Stop">'
    || R_PRODUCT_DETAIL.stop
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Profile_No">'
    || R_PRODUCT_DETAIL.PROFILE_NO
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Door_Style">'
    || R_PRODUCT_DETAIL.DOOR_STYLE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Glaze">'
    || R_PRODUCT_DETAIL.GLAZE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Shape">'
    || R_PRODUCT_DETAIL.SHAPE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Glass">'
    || R_PRODUCT_DETAIL.GLASS
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Hinge_Side">'
    || R_PRODUCT_DETAIL.HINGE_SIDE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Hinge_Type">'
    || R_PRODUCT_DETAIL.HINGE_TYPE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "EGE">'
    || R_PRODUCT_DETAIL.EGE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Door_Style_Code">'
    || R_PRODUCT_DETAIL.DOOR_STYLE_CODE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Finish_Technique">'
    || R_PRODUCT_DETAIL.FINISH_TECHNIQUE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Hinge_Location">'
    || R_PRODUCT_DETAIL.HINGE_LOCATION
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Construction_Type">'
    || R_PRODUCT_DETAIL.CONSTRUCTION_TYPE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Panel_Type">'
    || R_PRODUCT_DETAIL.PANEL_TYPE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Panel_Profile_No">'
    || R_PRODUCT_DETAIL.PANEL_PROFILE_NO
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Rail_Profile_No">'
    || R_PRODUCT_DETAIL.RAIL_PROFILE_NO
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Rail_1_Length">'
    || R_PRODUCT_DETAIL.RAIL_1_LENGTH
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Stile_Profile_No">'
    || R_PRODUCT_DETAIL.STILE_PROFILE_NO
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Rail_2_Length">'
    || R_PRODUCT_DETAIL.RAIL_2_LENGTH
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Stile_1_Length">'
    || R_PRODUCT_DETAIL.STILE_1_LENGTH
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Stile_2_Length">'
    || R_PRODUCT_DETAIL.STILE_2_LENGTH
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Panel_1_Width">'
    || R_PRODUCT_DETAIL.PANEL_1_WIDTH
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Panel_1_Length">'
    || R_PRODUCT_DETAIL.PANEL_1_LENGTH
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Panel_2_Width">'
    || R_PRODUCT_DETAIL.PANEL_2_WIDTH
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Panel_2_Length">'
    || R_PRODUCT_DETAIL.PANEL_2_LENGTH
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT ||'</label>';
    /*-----------------------------------------+
    | Handling XML data for special message |
    +-----------------------------------------*/
    FOR rec_count IN c_count (r_product_detail.item_id)
    LOOP
    L_XML_CONTENT := L_XML_CONTENT || '<label _FORMAT='
    || '"'
    || 'lib://FRD/SpecMessage_Door.btw'
    || '"'
    || ' _PRINTERNAME='
    || '"'
    || v_printer
    || '"'
    || ' _QUANTITY='
    || '"'
    || v_quantity
    || '"'
    || '>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Serial_Number">'
    || REC_COUNT.SERIAL_NUMBER
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Special_Message">'
    || REC_COUNT.ATTRIBUTE_VALUE
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Cabinet_Sequence_No">'
    || REC_COUNT.CABINET_NUMBER
    || '</variable>';
    L_XML_CONTENT := L_XML_CONTENT ||'</label>';
    EXIT WHEN c_count%NOTFOUND;
    end LOOP;
    -- L_XML_CONTENT := L_XML_CONTENT || '</labels>';
    fnd_file.put_line (fnd_file.LOG, l_xml_content);
    dbms_output.put_line ( l_xml_content );
    L_LABEL_COUNT := L_LABEL_COUNT + 1;
    -- apps.inv_print_request.sync_print_tcpip (l_xml_content,
    -- l_job_status,
    -- l_printer_status,
    -- l_status_type,
    -- l_return_status,
    -- l_return_msg
    END LOOP;
    END LOOP;
    l_xml_content := l_xml_content || '</labels>';
    fnd_file.put_line (fnd_file.LOG, l_xml_content);
    apps.inv_print_request.sync_print_tcpip (l_xml_content,
    l_job_status,
    l_printer_status,
    l_status_type,
    l_return_status,
    l_return_msg
    L_XML_CONTENT := null;
    /*--------------------------------------------------------------------------------------+
    | APPS.INV_PRINT_REQUEST.SYNC_PRINT_TCPIP will send the XML data to TCP/IP Port |
    +--------------------------------------------------------------------------------------*/
    fnd_file.put_line (fnd_file.LOG,
    'Printer Status:' || ' ' || l_printer_status
    fnd_file.put_line (fnd_file.LOG,
    'Return Status:' || ' ' || l_return_status
    fnd_file.put_line (fnd_file.LOG,
    'Return Message:' || ' ' || L_RETURN_MSG
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN
    fnd_file.put_line
    (fnd_file.LOG,
    'Unexpected error in the xxmb_get_xml_data_1270 procedure, error is : '
    || SQLERRM
    || ', '
    || SQLCODE
    END xxmb_get_xml_data_1270;
    END xxmb_wip_prod_tag_door_pkg;
    /

  • Can I create an XSD from XML data in a CLOB?

    Environment:
    Oracle 11.2.0.3 EE on Solaris.
    Very much an XML newbie so please be kind! 
    I have spent the past few days pouring through the documentation and various blogs, especially this one, but ... I need some help.
    I am trying to extract XML data stored in a CLOB and produce a flat file for the user's consumption.
    They have sent me what they think is the XSD for the XML data but when I look at the data in the CLOB I don't see the tags documented in the XSD.
    I'd like to produce an XSD based on the actual data to compare with what they've sent.
    Is this possible?
    I am able to query the XML data using the tags I see in the data using XMLTable and it's working fine.
    Any help is greatly appreciated.
    -gary

    Welcome to the XML side of the world, where you will love it and curse it, just like any other piece of technology.
    So as I understand it, the scope of your operation is to extract information from an XML file and then write that information to disk, correct?
    Some questions
    - Why is the XML stored in a CLOB instead of an XMLType column?  Without knowing the system history, it is a valid question.
    - How big are the XML?  The reason I ask this is because when the XML is stored in XMLType columns (of Object Relational structure or SECUREFILE BINARY XML format), then Oracle can parse the XML substantially easier than when it is stored as a CLOB.  If the XML is fairly small, you may see no performance difference between the two.
    The Oracle DB itself has no built in ability to generate a schema from an XML file.  In order to do that, you would need to use some third party tool that has that functionality built in.  For example, XML Spy can do this.  Other tools can as well, but that is what came to mind first as it is what I use.  The one thing to remember is that the schema it builds represents that one instance of XML.  Other instances of XML may be different and not validate against the schema you generated, but still have been valid against the unknown original schema.
    You can register the schema in the database and then use the XML to create an XMLType instance associated to the schema and then validate the XML that way.  One example can be found at XML DB FAQ and here is another example Re: XML Schema validation
    Hope that helps you continue on.

  • Parsing XML data stored as CLOB in DB and save attribute values in table

    Hello,
    I have a CLOB column in table that is holding XML data as follows,
    <banners>
    <banner-image id="0">
    <type>BANNER</type>
    <local-path>http.gif</local-path>
    <click-through-url>www</click-through-url>
    <make>Acura</make>
    </banner-image>
    <banner-image id="1">
    <type>BANNER</type>
    <local-path>http.gif</local-path>
    <click-through-url>gfrty</click-through-url>
    <make>BMW</make>
    </banner-image>
    </banners>
    Now I need to parse thru the above XML data and pull the attribute values to store in another table as follows,
    BANNER_IMAGE_ID | TYPE | LOCAL_PATH | CLICK_URL | MAKE
    0 | BANNER | http.gif | www | Acura
    1 | BANNER | http.gif | gfrty | BMW
    And XML data doesn't always end up with 2 rows in this table....some times it may be 3 or 4 as well. It is just that in this example it ended up with 2 rows.
    So, I would appreciate if someone can help me find a generic way of doing this,
    Thank you in advance,
    Madhu.

    This is not a reply.. sorry.
    I took have a similar problem only..
    can you pls help me
    XML structure.
    <PODetails>
    <POHeader>
    <CurrencyID>INR</CurrencyID>
    <ExchangeRate>1</ExchangeRate>
    <RefNo>0080000110</RefNo>
    <VendorID>1200</VendorID>
    <TransDate>2006-12-20</TransDate>
    <DocRelationshipId>PURCHASE</DocRelationshipId>
    <LocationID>0000102327</LocationID>
    </POHeader>
    <POItemDetails>
    <ItemID>ARSH1332</ItemID>
    <Size>L HS</Size>
    <Quality>Q1</Quality>
    <CustPO>rush order</CustPO>
    <UOM>PC</UOM>
    <Quantity>3.000</Quantity>
    <PriceValue>2509.5</PriceValue>
    <TaxAmount>0.00</TaxAmount>
    </POItemDetails>
    <POItemDetails>
    <ItemID>ARSH1332</ItemID>
    <Size>M HS</Size>
    <Quality>Q1</Quality>
    <CustPO>rush order</CustPO>
    <UOM>PC</UOM>
    <Quantity>2.000</Quantity>
    <PriceValue>1673</PriceValue>
    <TaxAmount>0.00</TaxAmount>
    </POItemDetails>
    <POItemDetails>
    <ItemID>ARSH1556</ItemID>
    <Size>39FS</Size>
    <Quality>Q1</Quality>
    <CustPO>rush order</CustPO>
    <UOM>PC</UOM>
    <Quantity>1.000</Quantity>
    <PriceValue>836.5</PriceValue>
    <TaxAmount>0.00</TaxAmount>
    </POItemDetails>
    </PODetails>
    The DB is ORACLE 9i
    This is stored in a XML table of type XMLTYPE.
    THIS I USED THE .extract function to get the values of the nodes.
    POHeader details are working fine. But when i get the POItemDetails i am getting 'ARSH1332ARSH1332ARSH1556' when i issue the command
    select a.extract('/PODetails/POItemDetails/ItemID/text()').getStringVal() ItemID
    FROM xmltable a
    WHERE a.existsnode('//POItemDetails/ItemID')=1
    Pls Help..
    Regds,
    Santhoshkumar.G.

  • Is there a tool to convert XML data model into berkeleydb automatically?

    Hi all,
    Is there already a tool which convert a xml data model definition file into C++ source code with berkeleydb as underlying db implementation?
    If there is already one, I don't need to spend the time to code it.
    Regards,
    -Bruce

    Hello,
    One suggestion is to take a look at the Berkeley DB XML documentation at:
    http://docs.oracle.com/cd/E17276_01/html/toc.htm
    and see if you find what you are looking for.
    Thanks,
    Sandra

  • How to Push the into SAP ( XML data converted into IDOC )

    Hi
    i am getting XML file from Non SAP system.I need to push XML data into SAP on daily basis with out using XI as the middleware.
    I know if i get text file will use BDC's or LSMW. But i am getting data in XML format and then i need to converted into IDOC format and stored in to sap data base tables.
    Thanks for advance.
    srini

    Is the XML an IDOC-XML or custom XML that you need to post as an IDOC??
    If it is IDOC-XML you need to defined XMLFile port to process the IDOC-XML without any mapping.
    If it is a custom XML, parse the XML data into an internal table (as required) & continue with BDC or IDOC posting as you wish.
    Check for XML parsing programs..
    -Siva Maranani

  • Capture XML data payload into database table (Oracle EBS R12)

    Hi All,
    We have a XML Publisher report which generates output in PDF format. We want to capture the XML data payload generated by this report and put it into a DB table once the PDF is generated.
    This report is generated through Oracle EBS R12 and XML Payload is stored by oracle by default in $APPLCSF/out directory.
    Any pointers would be helpful
    br

    Couple of options, this one is probably the easiest without knowing other requirements (e.g., do you have to store the output as XML, or do you just the data available so you can output in XML later?).
    Capture the SQL statement that generates the output in the first place. If you have that statement, you can insert into some table using the select statement. Once you have the report data (and you can tag that particular set of data with a job ID, timestamp, whatever, in case you need to store it and distinguish it from other reports down the road), you can generate XML output using the PL/SQL built-in DBMS_XMLGEN.
    Is that what you are looking for?

Maybe you are looking for

  • My mac is getting full...

    I like my music on my mac but I don't need all those series and movies on there... is there a way for me too keep movies and series on a external drive while keeping all my music on my mac while at the same time syncing all this to my TV?

  • Private network VC

         Hi Guys, Need your inputs , one of my client wants to have VC with the their international loaction and Client wants to do on  MPLS, with Private IP assigned to end point and there are multiple service provider in between , He wants to have poin

  • Problem with AAM

    I would like to complain about the way AAM does not work. 1) It does not report update. Throug mac update I know there is an update for Dreamwaver (12.0.3). It is not reported in AAM which show it as up to date, it is not marked in Dreamweaver update

  • Still images with lines

    Hey Guys, This sounds like such an elementary issue that I should be able to figure out. But basically I have some images (psd) that I imported into Final Cut and I have put basic motion on all of them. Everytime I export the video I end up with line

  • Can a GSS respond with a different IP if a target server is down?

    This is my first GSS and I have read the Cisco Administration guide so please take pity on me. I don't have any CRA or VIP devices on my network , so is it possible to have the GSS return one IP address if the target device is up and another IP addre