Using XMLDOM to process document in XML DB

I am new to XML and especially XML DB which I however see as an excellent platform on which to base XML based solutions. I have a specific question and apologise beforehand should any of my assumptions be incorrect.
I wish to create an application which from a number of XML fragments, together with rules governing the behaviour of the fragments (insertion points, overwrite rules etc) are merged together to finally leave me with a complete and valid XML document in XML DB.
I thought at first that I could use DBMS_XMLDOM to perform this low level processing required. I have however not managed to understand how this can be used together with XMLDB. I am reluctant to use XMLDOM without XMLDB as I am afraid that I will surpass the limits in XML document size apparently imposed by XMLDOM.
I see a solution where I create a schema based resource in XML DB containing the initial XML structure and then processing any number of the above mentioned fragments to finaly be left with a complete XML document.
Can I use XMLDOM to do this or am I barking up the wrong tree?
I would be grateful for any input on techniques that I can apply to perform elementary search/replace/insert on an XML document which I am, from PLSQL, compiling.
Thanks
Hans Christiansen

Hi
The size of the documents I want to compose are expected vary from a few Kb to 1 or 2 Gb! In a FAQ found somewhere on OTN there was an entry which mentioned that somebody was having trouble with a 50Mb XML document. The recommendation was to use SAX but I am under the impression that this is more useful when the processing is of a more sequential nature.
The main thread of my question is to gain clarity in the most suitable technique to use when actualy compsing the XML.
What I want to do is:
Create resource (XML document) in XML DB.
Loop through XML fragments together with rules:
For each fragment process according to rules and insert
fragment or update existing XML based on fragment contents.
At the end of the loop the XML document is complete and ready for further processing.
XMLDOM seems to give me the tools to do this but I am unsure of how to do this and have XMLDOM work directly against the contents in the resource controlled by XML DB (making use of possible indexes and the scalable nature of XMLDB). I get the feeling that if I simply read the XML from XMLDB resource into a DOM document I am still using the memory based representation of the XML until I write the XML back to XMLDB - is this a correct assumption.
Alternatively is it the functionality offered by XPath, extract(), updatexml() etc. that I should be looking at?
Does this make my question more understandable?
Hans

Similar Messages

  • Load XLM into pl sql using xmldom

    Hi ,
    I have problems when I use xmldom to retrieve infotmation from xml to storethe information into a table. For the first xml , I can do it , for the second one I have problems ( I can't retrieve the values I need ) and I don't know why. Please don't reply me by providing links , I just would like to have an idea of what is going wrong with the second xml. Thanks in advance.
    It works fine with this one :
    <?xml version="1.0" encoding="windows-1252" ?>
    - <GraydonBeDialogue>
    <TransactionCode>RTB</TransactionCode>
    - <Table ClassTable="Country">
    - <TableEntry>
    <TableLanguage>N</TableLanguage>
    <TableCode>AD</TableCode>
    <TableValue>Andorra</TableValue>
    </TableEntry>
    - <TableEntry>
    <TableLanguage>N</TableLanguage>
    <TableCode>AE</TableCode>
    <TableValue>Verenigde Arabische Emiraten</TableValue>
    </TableEntry>
    - <TableEntry>
    <TableLanguage>N</TableLanguage>
    <TableCode>AF</TableCode>
    <TableValue>Afghanistan</TableValue>
    </TableEntry>
    - <TableEntry>
    <TableLanguage>N</TableLanguage>
    <TableCode>AG</TableCode>
    <TableValue>Antigua en Barbuda</TableValue>
    </TableEntry>
    But it does not work with this one :
    <?xml version="1.0" encoding="windows-1252" ?>
    - <GraydonBeDialogue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com Z:\PROGRAMMATIE\AS400\projecten\XML\GraydonBe\InfoReview\Review.xsd" xmlns="http://www.w3schools.com">
    <Transaction>PDT</Transaction>
    - <GraydonBeInformation>
    - <Default>
    <DateFormat>YYYYMMDD</DateFormat>
    <TimeFormat>HHMMSS</TimeFormat>
    <Currency>EUR</Currency>
    <CountryCode>BE</CountryCode>
    <DecimalSign>.</DecimalSign>
    </Default>
    - <Header>
    <Name>GRAYDON BELGIUM NV /SA</Name>
    <ContentGenerationDate>20050722</ContentGenerationDate>
    <ContentGenerationTime>101110</ContentGenerationTime>
    <Product>REV</Product>
    <ClientNumber>156</ClientNumber>
    </Header>
    - <Body>
    - <Msg48>
    - <MsgHeader>
    <MsgDate>20050712</MsgDate>
    <MsgCode Table="RevDsoMsg">48</MsgCode>
    - <Business>
    <BusinessNumber>0480316383</BusinessNumber>
    <Name>STANLEYBET BELGIQUE SA</Name>
    - <Address>
    <Street>PEGASUSLAAN 5</Street>
    <PostCode>1831</PostCode>
    <City>MACHELEN</City>
    </Address>
    </Business>
    </MsgHeader>
    <SinceDate Format="YYYYMM">200506</SinceDate>
    </Msg48>
    - <Msg123>
    - <MsgHeader>
    <MsgDate>20050711</MsgDate>
    <MsgCode Table="RevDsoMsg">123</MsgCode>
    - <Business>
    <BusinessNumber>0403157932</BusinessNumber>
    <Name>CELANESE NV</Name>
    - <Address>
    <Street>INDUSTRIEWEG 80</Street>
    <PostCode>3620</PostCode>
    <City>LANAKEN</City>
    </Address>
    </Business>
    </MsgHeader>
    - <PreviousCreditAssessement>
    <CreditAssessementAmount>10691000</CreditAssessementAmount>
    </PreviousCreditAssessement>
    - <NewCreditAssessement>
    <CreditAssessementAmount>9706000</CreditAssessementAmount>
    </NewCreditAssessement>
    </Msg123>
    Could you explain me what could be wrong ?
    I am using the same logic for both xml :
    declare
    bnb xmldom.domnodelist;
    l_node xmldom.domnode;
    l_doc xmldom.domdocument;
    begin
    parse_document (l_file_name, doc_in);
    bnb := selected_nodes (doc_in, '/GraydonBeDialogue/Table[@ClassTable="Review"]/TableEntry');
    FOR entry_index IN 0 .. xmldom.getlength (bnb) - 1
    LOOP
    l_node := xmldom.item (bnb, entry_index);
    TableLanguage := trim(xslprocessor.valueof (l_node, 'TableLanguage'));
    TableCode := trim(xslprocessor.valueof (l_node, 'TableCode'));
    TableValue := trim(xslprocessor.valueof (l_node, 'TableValue'));
    -- Treat the data
    .....

    Couple of friendly tips.
    When pasting XML, don't copy it directly from the browser's normal view as that usually inserts a "-" on some lines, which makes it invalid XML when you copy/paste. Either open the XML in something besides a browser or do a View Page Source (or similar) to copy the true XML.
    Use the tag to wrap XML and code to retain formatting as shown in the FAQ (under your sign-in name in the upper right).
    In your first sample XML, the root node is defined as
    <GraydonBeDialogue>
    and in the second it is defined as (ignoring attributes that don't matter to us now)
    <GraydonBeDialogue xmlns="http://www.w3schools.com">
    This means the second XML resides in a default namespace and so to access any/all nodes that reside in this namespace, you must provide that namespace to the extract method.
    For many Oracle based functions that take an Xpath as a parm, Oracle has the next parm defined as the namespace.  This allows you to pass in the namespace associated to the XML nodes.  With default namespaces, it does add a twist as you have to make up a namespace prefix for the Xpath/namespace declaration so that the engine knows the nodes reside in a namespace (be it default) instead of not residing in a namespace.  Here's a little something I wrote up on this
    http://anononxml.blogspot.com/2010/06/xml-parsing-with-default-namespaces-via.html
    I prefer now to use XMLType when parsing XML in PL/SQL as a bit more flexible/easier to code.
    Without seeing what you hid in
    selected_nodes
    it is hard to say exactly where your problem is but hopefully that gives you a start.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Using xmldom.writeToClob to update xml clob corrupts clob

    We are storing an xml document in a clob field in the db. As part of a data check we need to parse the xml and possibly remove a node. I can do that, and check the results using 'xmldom.writeToBuffer'.
    When I try to write the data back to the db using 'xmldom.writeToClob' I get strange results. Data seems to be appended to the end of the clob and contains chr(13) characters at the end of each line.
    Also does anyone know if the existence of whitespace in the xml clob would cause a parse/search to be slower?
    I am new to xml and might be missing something fairly basic in the following code. Thanks in advance for any help.
    Here is some of the code:
    doc xmldom.DOMDocument;
    curNode xmldom.DOMNode;
    parentNode xmldom.DOMNode;
    theNodeList xmldom.DOMNodeList;
    str varchar2(4000);
    begin
    -- open xml_rec cursor (xml is the clob field opened for update)
    -- Loop through all item elements
    theNodeList := xmldom.getElementsByTagName(doc, 'item');
    for m in 0..xmldom.getLength(theNodeList)-1 loop
    curNode := xmldom.item(theNodeList,m);
    --perform a check and possibly delete the current node
    parentNode := xmldom.getParentNode(curNode);
    parentNode := xmldom.removechild(parentNode, curNode);
    xmldom.writeToBuffer(doc, str);
    --I check the results here and everything looks good
    xmldom.writeToClob(doc, xml_rec.xml);
    --When I check the clob the data is incorrect.
    null

    The next cod is a sample of the implementation xmldom.writeToClob used xmldom.DOMNode in the parameter of input.
    DECLARE
    XMLOut CLOB := EMPTY_CLOB();
    XMLIn Varchar2(2000);
    XSLPath Varchar2(2000);
    BEGIN
    DBMS_LOB.CREATETEMPORARY(XMLOut,TRUE); -- Give permit
    DBMS_LOB.OPEN (XMLOut, DBMS_LOB.LOB_READWRITE); --open the file of read and write
    XSLPath := '/users/gcardona/plantillas/report.xsl';
    GE_BSXMLCONVERT.createElementName('COLUMN');
    GE_BSXMLCONVERT.createElementAttribute('name', 'OUTXML');
    GE_BSXMLCONVERT.addElement();
    GE_BSXMLCONVERT.createElementName('table');
    GE_BSXMLCONVERT.createElementAttribute('name', 'X1');
    GE_BSXMLCONVERT.createElementAttribute('width', '100');
    GE_BSXMLCONVERT.addElement();
    XMLIn := GE_BSXMLCONVERT.toXML();
    XSLTranform(XMLIn, XSLPath, XMLOut);--XMLOut is a variable in out in the procedure,
    --here is where is return the file XML Process
    insert into in_prueba (ID,XML_CLOB) values (200, XMLOut);
    DBMS_LOB.CLOSE (XMLOut); -- Close File
    DBMS_LOB.FREETEMPORARY(XMLOut); --free memory
    GE_BSXMLCONVERT.clearMemory();
    commit;
    END;
    null

  • Creating XML File Using xmldom Package

    How can I create an XML file from scratch using the PL/SQL xmldom package?
    I want to create an XML file using the xmldom package instead of building the individual tags as strings of VARCHAR2 character data. There is quite a bit of documentation regarding manipulating input XML files using DOM -- but not for creating XML files from scratch given known "tagnames" (<lastName>) and retrieved database "values" ("Smith").
    <person>
    <lastName>Smith</lastName>
    </person>
    Is there any documentation that you can recommend?
    Thank you.

    Here is an example.
    The create_file procedure creates the file.
    The other procedures are generic procs that can be used with any XML.
    PROCEDURE create_file_with_root(po_xmldoc OUT xmldom.DOMDocument,
    pi_root_tag IN VARCHAR2,
                                            po_root_element OUT xmldom.domelement,
                                            po_root_node OUT xmldom.domnode,
                                            pi_doctype_url IN VARCHAR2) IS
    xmldoc xmldom.DOMDocument;
    root xmldom.domnode;
    root_node xmldom.domnode;
    root_element xmldom.domelement;
    record_node xmldom.domnode;
    newelenode xmldom.DOMNode;
    BEGIN
    xmldoc := xmldom.newDOMDocument;
    xmldom.setVersion(xmldoc, '1.0');
    xmldom.setDoctype(xmldoc, pi_root_tag, pi_doctype_url,'');
    -- Create the root --
    root := xmldom.makeNode(xmldoc);
    -- Create the root element in the file --
    create_element_and_append(xmldoc, pi_root_tag, root, root_element, root_node);
    po_xmldoc := xmldoc;
    po_root_node := root_node;
    po_root_element := root_element;
    END create_file_with_root;
    PROCEDURE create_element_and_append(pi_xmldoc IN OUT xmldom.DOMDocument,
    pi_element_name IN VARCHAR2,
                                            pi_parent_node IN xmldom.domnode,
                                            po_new_element OUT xmldom.domelement,
                                            po_new_node OUT xmldom.domnode) IS
    element xmldom.domelement;
    child_node xmldom.domnode;
    newelenode xmldom.DOMNode;
    BEGIN
    element := xmldom.createElement(pi_xmldoc, pi_element_name);
    child_node := xmldom.makeNode(element);
    -- Append the new node to the parent --
    newelenode := xmldom.appendchild(pi_parent_node, child_node);
    po_new_node := child_node;
    po_new_element := element;
    END create_element_and_append;
    FUNCTION create_text_element(pio_xmldoc IN OUT xmldom.DOMDocument, pi_element_name IN VARCHAR2,
    pi_element_data IN VARCHAR2, pi_parent_node IN xmldom.domnode) RETURN xmldom.domnode IS
    parent_node xmldom.domnode;                                   
    child_node xmldom.domnode;
    child_element xmldom.domelement;
    newelenode xmldom.DOMNode;
    textele xmldom.DOMText;
    compnode xmldom.DOMNode;
    BEGIN
    create_element_and_append(pio_xmldoc, pi_element_name, pi_parent_node, child_element, child_node);
    parent_node := child_node;
    -- Create a text node --
    textele := xmldom.createTextNode(pio_xmldoc, pi_element_data);
    child_node := xmldom.makeNode(textele);
    -- Link the text node to the new node --
    compnode := xmldom.appendChild(parent_node, child_node);
    RETURN newelenode;
    END create_text_element;
    PROCEDURE create_file IS
    xmldoc xmldom.DOMDocument;
    root_node xmldom.domnode;
    xml_doctype xmldom.DOMDocumentType;
    root_element xmldom.domelement;
    record_element xmldom.domelement;
    record_node xmldom.domnode;
    parent_node xmldom.domnode;
    child_node xmldom.domnode;
    newelenode xmldom.DOMNode;
    textele xmldom.DOMText;
    compnode xmldom.DOMNode;
    BEGIN
    xmldoc := xmldom.newDOMDocument;
    xmldom.setVersion(xmldoc, '1.0');
    create_file_with_root(xmldoc, 'root', root_element, root_node, 'test.dtd');
    xmldom.setAttribute(root_element, 'interface_type', 'EXCHANGE_RATES');
    -- Create the record element in the file --
    create_element_and_append(xmldoc, 'record', root_node, record_element, record_node);
    parent_node := create_text_element(xmldoc, 'title', 'Mr', record_node);
    parent_node := create_text_element(xmldoc, 'name', 'Joe', record_node);
    parent_node := create_text_element(xmldoc,'surname', 'Blogs', record_node);
    -- Create the record element in the file --
    create_element_and_append(xmldoc, 'record', root_node, record_element, record_node);
    parent_node := create_text_element(xmldoc, 'title', 'Mrs', record_node);
    parent_node := create_text_element(xmldoc, 'name', 'A', record_node);
    parent_node := create_text_element(xmldoc, 'surname', 'B', record_node);
    -- write the newly created dom document into the buffer assuming it is less than 32K
    xmldom.writeTofile(xmldoc, 'c:\laiki\willow_data\test.xml');
    EXCEPTION
    WHEN xmldom.INDEX_SIZE_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Index Size error');
    WHEN xmldom.DOMSTRING_SIZE_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'String Size error');
    WHEN xmldom.HIERARCHY_REQUEST_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Hierarchy request error');
    WHEN xmldom.WRONG_DOCUMENT_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Wrong doc error');
    WHEN xmldom.INVALID_CHARACTER_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Invalid Char error');
    WHEN xmldom.NO_DATA_ALLOWED_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Nod data allowed error');
    WHEN xmldom.NO_MODIFICATION_ALLOWED_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'No mod allowed error');
    WHEN xmldom.NOT_FOUND_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Not found error');
    WHEN xmldom.NOT_SUPPORTED_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Not supported error');
    WHEN xmldom.INUSE_ATTRIBUTE_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'In use attr error');
    WHEN OTHERS THEN
    dbms_output.put_line('exception occured' || SQLCODE || SUBSTR(SQLERRM, 1, 100));
    END create_file;

  • HT4168 I have created an 100 page booklet in Pages, with many photographs, can I export it to ePub, and make an electronic book, because it says that "Note: The Pages document must have been created using a word processing template"?

    I have created an 100 page booklet in Pages, with many photographs, and much written word, can I export it to ePub, and make an electronic book, because it says that "Note: The Pages document must have been created using a word processing template"?....
    Basically what I want to do is publish the document into both an eDocument, and a hard copy document. What is the best way to do this?

    No Peter, this statement came right off the Apple ePub statement when outlining how to use ePub. the full context is:
    Creating ePub files with Pages
    Summary
    Learn how to create ePub files with Pages.
    Products Affected
    Pages '09
    ePub is an open ebook standard produced by the International Digital Publishing Forum. Pages ’09 lets you export your documents in ePub format for reading with iBooks on iPhone, iPad, or iPod touch.
    iBooks supports both ePub and PDF file formats, and you can export both from Pages.
    When to use ePub or PDF
    Use ePub when text is the most important part of your document, for example when you create a book, a report, a paper, a thesis, or classroom reading material.
    More details on using ePubUse PDF when layout is the most important part of your document, for example when you create a brochure, a flyer, or a manual with multiple illustrations.
    More details on using PDF
    Creating an ePub Document to Read in iBooks
    You can export any Pages word processing document to the ePub file format for reading in an ePub reader, such as the iBooks application on the iPad, iPhone, or iPod touch. Documents created in page layout templates can’t be exported to the ePub format.
    Documents exported to ePub format will look different than their Pages counterparts. If you want to get the best document fidelity between the Pages and ePub formats, style your Pages document with paragraph styles and other formatting attributes allowed in an ePub file. A sample document is provided on the Apple Support site that features styles and guidelines to help you create a Pages document that’s optimized for export to the ePub file format, which you can use as a template or a guide. To learn more about using paragraph styles in Pages, see the topics under the heading “Working with Styles” in the Pages built-in help.
    To read your ePub document in iBooks on your mobile device, you must transfer the ePub file that you create onto your device.
    To use the “ePub Best Practices” sample documentTo learn more about using the ePub format and get a better feel for how a Pages document might appear as a book in iBooks, it’s a good idea to download the “ePub Best Practices” sample document. After reading the guidelines and instructions within the document, you can use it as a template to create your own document. You can also import the styles from the sample document into a new document you create.
    Download the “ePub Best Practices” sample document at the following web address:
    http://images.apple.com/support/pages/docs/ePub_Best_Practices_EN.zip
    Do either of the following:Use the sample document as a template.Import the paragraph styles from the sample document into a new or existing Pages document.
    Export the document you create to ePub format to see how it looks in iBooks.
    Preparing an existing Pages document for export to ePub format
    Documents exported to the ePub format automatically appear with page breaks before every chapter. A table of contents is automatically generated, which allows readers to jump quickly to any chapter title, heading, or subheading in the book. In order to create a meaningful table of contents, it’s important to apply appropriate styles within your document. The ePub reader uses the paragraph styles to determine which items should appear in the table of contents for your book.
    Note: The Pages document must have been created using a word processing template.

  • XSLT Using document() reference XML DB object

    I have two XML structured documents loaded in XML DB, and I use transform on x1.xml with a style sheet that contains :
    <xsl:apply-templates select="document('x2.xml')"/>
    what's the best way to reference the x2.xml found in the database using the document function of the XSL ... can this be done?

    In theory you'll need to create a resource (repository object) that references x2.xml and then refer to it by it's path from the root of the repository

  • Using "XML Document from XML Schema" in JDeveloper

    Hi Experts,
    I have a requirement to generate XML Document from XML Schema.
    For this I have used "XML Document from XML Schema" feature in JDeveloper. It is found in File->New->General->XML Document form XML Schema.
    I have registered a schema with jdev and got an XML document output for that successfully.
    Now, I want to implement this feature in my code for generating XML documents when XSD files are provided.
    Can any one please provide me with pointers to do that? I am sure there should be some libraries which can implement this feature.
    Thanks,
    Dilbagh

    Create an XML document from a Schema with the Oracle SchemaClassGenerator.
    import oracle.xml.classgen.SchemaClassGenerator;
    XMLSchema schema=new XMLSchema();
    XSDBuilder builder = new XSDBuilder();
    URL    url =  new URL(schemaUrl);     
    schema = (XMLSchema)builder.build(url);
    SchemaClassGenerator generator = new SchemaClassGenerator();
    Generate the Java classes from the example XML Schema.
    generator.generate(schema);With the java classes construct an XML document.

  • INSERTION OF XML DATA INTO THE TABLE USING XMLDOM

    hello,
    i am using XMLDOM to insert the data into the table
    i am using different function of it.
    but i am facing the problem to retrive the the multiple entry.
    like in my example i have two entry of the ' po number '
    & i am using the function
    dbms_xmldom.item(l_nodelist, 0)
    i which i have to pass index no.
    & through this i am getting only single entry according to the index no.
    Example on which i am working is
    declare
    l_xml_data CLOB;
    l_xml_doc dbms_xmldom.domdocument;
    l_nodelist dbms_xmldom.DOMNodeList;
    l_node dbms_xmldom.domnode;
    l_xmltype XMLTYPE;
    l_po_num VARCHAR2(30);
    l_cust_ord VARCHAR2(30);
    l_item_code VARCHAR2(30);
    begin
    l_xml_data := '<?xml version="1.0" encoding="UTF-8"?>
    <!--DOCTYPE MobileInventoryResponse SYSTEM "MobileInventoryResponse.dtd"-->
    <MobileInventoryResponse>
         <message>
              <message-header>
                   <message-id>16244182</message-id>
                   <transaction-name>ship-advice</transaction-name>
                   <partner-name>cbeyond</partner-name>
                   <source-url>http://www.brightpoint.com</source-url>
                   <create-timestamp>20080826150709</create-timestamp>
                   <response-request>1</response-request>
              </message-header>
              <ship-advice>
                   <header>
                        <customer-id>297859</customer-id>
                        <shipment-information>
                             <ship-first-name>RA_13Aug_1</ship-first-name>
                             <ship-last-name>MIND</ship-last-name>
                             <ship-address1>test</ship-address1>
                             <ship-city>test</ship-city>
                             <ship-state>VA</ship-state>
                             <ship-post-code>22102-4931</ship-post-code>
                             <ship-country-code>US</ship-country-code>
    <ship-phone1>0040726335068</ship-phone1>
    <ship-email>[email protected]</ship-email>
    <ship-via>FX01</ship-via>
    <ship-request-date>20080826</ship-request-date>
    <ship-request-warehouse>CBY1</ship-request-warehouse>
    </shipment-information>
    <purchase-order-information>
    <purchase-order-number>380928</purchase-order-number>
    <purchase-order-number>380929</purchase-order-number> ----modi by Ananda Dubey
    <account-description/>
    <purchase-order-amount>0.0</purchase-order-amount>
    <currency-code>USD</currency-code>
    </purchase-order-information>
    <order-header>
    <customer-order-number>0002759</customer-order-number>
    <customer-order-date>20080826</customer-order-date>
    <order-sub-total>19.0</order-sub-total>
    <order-discount>0.0</order-discount>
    <order-tax1>0.0</order-tax1>
    <order-tax2>0.0</order-tax2>
    <order-tax3>0.0</order-tax3>
    <order-shipment-charge>18.0</order-shipment-charge>
    <order-total-net>0.0</order-total-net>
    <order-status>Completed</order-status>
    <order-type/>
    <brightpoint-order-number>35028788</brightpoint-order-number>
    <warehouse-id>CBY1</warehouse-id>
    <ship-date>20080826</ship-date>
    </order-header>
    </header>
    <detail>
    <line-item>
    <line-no>1</line-no>
    <item-code>SKU1</item-code>
    <universal-product-code>0</universal-product-code>
    <ship-quantity>1.0</ship-quantity>
    <unit-of-measure>EA</unit-of-measure>
    <serial-list>
    <serial-numbers>
    <esn>TIMI000013</esn>
    </serial-numbers>
    </serial-list>
    <line-status/>
    <base-price>0.0</base-price>
    <line-discount>0.0</line-discount>
    <line-tax1>0.0</line-tax1>
    <line-tax2>0.0</line-tax2>
    <line-tax3>0.0</line-tax3>
    <bill-of-lading>929406733828</bill-of-lading>
    <scac>FX01</scac>
    </line-item>
    </detail>
    </ship-advice>
    <transactionInfo>
                   <eventID>16244182</eventID>
              </transactionInfo>
         </message>
    </MobileInventoryResponse>';
    l_xml_doc := dbms_xmldom.newDomDocument(l_xml_data);
    -- Method 1 to get data
    l_nodelist := dbms_xmldom.getelementsbytagname(l_xml_doc, 'purchase-order-number');
    l_node := dbms_xmldom.item(l_nodelist, 0); -- gets first item from list
    l_po_num := dbms_xmldom.getnodevalue(dbms_xmldom.getfirstchild(l_node));
    dbms_output.put_line(l_po_num);
    l_nodelist := dbms_xslprocessor.selectnodes(dbms_xmldom.makenode(l_xml_doc),
    '/MobileInventoryResponse/message/ship-advice/detail/line-item/item-code');
    l_node := dbms_xmldom.item(l_nodelist, 0); -- gets first item from list
    l_item_code := dbms_xmldom.getnodevalue(dbms_xmldom.getfirstchild(l_node));
    dbms_output.put_line(l_item_code);
    l_xmltype := XMLTYPE(l_xml_data);
    l_cust_ord := l_xmltype.extract('/MobileInventoryResponse/message/ship-advice/header/order-header/customer-order-number/text()').getStringVal();
    dbms_output.put_line(l_cust_ord);
    dbms_xmldom.freeDocument(l_xml_doc);
    end;
    /

    In the following code
    l_nodelist := dbms_xmldom.getelementsbytagname(l_xml_doc, 'purchase-order-number');
    l_node := dbms_xmldom.item(l_nodelist, 0); -- gets first item from listYou need to understand what the second parm on the .item call does. See [dbms_xmldom.item|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_xmldom.htm#i1126138]
    The nodelist is a 0 based array of information and you are only requesting to pull the node info in the first array position. So to get the info in the second array position, you need to use ", 1)". You can also use .getLength and a loop to parse through everything in the node list.

  • Office Open XML word processing document

    I am getting the following message when I try to open a Word (docx) Document on my iPhone 6 running iOS 8 (latest build at 08/10/14) from within an email account:
    "Office Open XML word processing document"
    I have tried installing Microsoft Office Mobile and a third part App called Documents.
    I have been sent different emails in DocX format (.docx) and I can not open any of them.
    I have tried pages on my iPhone and that does not work eaither.
    I can however open PDF documents.
    I have rebooted/restarted the iPhone twice.
    I have a coleage with an iPhone 5 with iOS 8 and they have the same problem.
    I have another coleage who has an iPhone 4 on an older version of iOS and theirs works fine.
    Any ideas?
    Cheers,
    Anthony

    I have had this problem for a while now. The only thing that worked is:
    On your iOS Device:
    Settings > General > Reset > Erase All Content & Settings
    Once it restores, connect to iTunes
    do not Restore from Back Up (this doesn't work) - instead select Set up as New Device
    This resolved the problem opening all mail attachments (PDF, .docx, .doc, .pptx, .ppt, .xlsx, etc.)
    Good luck.

  • How can i use a xsd while generating my xml document in oracle?

    Hi, how can i use a xsd while building my xml document query, so i know the xml was built properly?
    Cheers.

    Hi,
    Do you want to validate your xml against xsd?
    Read this
    validating
    There are some bugs also, for example  xml is invalid but no errors when calling schemaValidate()
    Ants

  • I'm trying to read some XML data from temperature logger over my network. I'm using LabView version 2009 sp1. I'm using the URL Get Document Vi. It works fine when using Internet sites like google or foxnews etc...

    I'm trying to read some XML data from temperature logger over my network.  I'm using LabView version 2009 sp1.  I'm using the URL Get Document Vi.  It works fine when using Internet sites like google or foxnews etc...
    When I use it with my temperature logger most of the time I get an Error 66...but some times it does work and actually retrieves the document. 
    I can use the same address "http://172.22.21.68/XMLfeed.rb" (Internet Explorer or Google Chrome) in my browser and get a response every time.  When accessing from my browser the server in the temperature logger does take around 6 seconds to respond, but it does respond every time. 
    Is the URL Get Document Vi exceeding a timeout?  If so, where can I set it to wait longer?
    Attachments:
    Error 66.jpg ‏183 KB

    It looks like the TCP Buffered Read has a 2.5 sec timeout, I believe that is where I had trouble as well.  Try creating your own URL Get HTTP Doc vi in which you call URL Get Document in normal mode, with an appropriate number of characters to fetch (enough characters so that you capture all the important data in the XML file).
    Attachments:
    ex1.PNG ‏33 KB

  • Post processing PDF to XML.

    Topic
    Post-processing PDF into XML.
    Compton MacKenzie - 08:48am Oct 29, 2008 Pacific
    Hi,
    Sorry for the basic question... We want to have users fill out a fillable PDF form using Aacrobat Reader and then upload it to a web page. Once we get the PDF, we need to extract the data that they have entered. Short of using LiveCycle Data Services (not currently feasible as we have no Java presence on our server platform), is there any API that I can use to extract the data or convert the PDF to XML. I understand that it is possible to export XML using the Acrobat client (and it might be possible to script this with COM) but I don't think this would work reliably in a server environment.
    (We need both the PDF and the data as the PDF will contain an electronically captured image of a customer's signature and need to preserve the actual image of the document.)
    Any suggestions?
    Thanks!

    There are server based products under the LiveCycle banner for this but they all run on a Java based app server. You can use a turn key install where the app server (JBoss) and a Database (MySql) are provided for you but you need to have the Java SDK present. The LiveCycle servers can run on Windows, Linux, AIX to name a few.
    Note that if you script Acrobat to do this on the server you are in violation of your license agreement.

  • BPE_ADAPTER MESSAGE_NOT_USED Message is not used by any processes

    We need some help on BPM flow. We are at it for last 3 days without much progress. We are able to make sync call to same BAPIs and get data without any issue. However, with BPM we have this issue
    I am creating the simplest integration scenario as
    1.       HTML/HTTP-->BPM (Async)
    2.       BPM-->R/3 (Sync)
    3.       BPM-->File (Async)
    Created all required interfaces and mapping. I have some dummy mapping for first 2 cases. I am able to activate the integration scenario and Integration Process without any error. I am able to import it in integration directory successfully without any error. When I am executing the first async request from HTML client I am invariably end up with an error from sxmb_moni as
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--
    Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="BPE_ADAPTER">MESSAGE_NOT_USED</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Message is not used by any processes</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    The BPM is not getting invoked. Looking at the trace it shows that there is an error after creating BPE proxy for message as
    <Trace level="3" type="T">created BPE proxy for message DE5FB5802F33D3F19373005056A12466</Trace>
      </Trace>
      </Trace>
    - <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST">
      <Trace level="3" type="T">Persisting message after plsrv call</Trace>
      <Trace level="3" type="T">Message-Version = 007</Trace>
      <Trace level="3" type="T">Message version 007</Trace>
      <Trace level="3" type="T">Pipeline CENTRAL</Trace>
      </Trace>
      <Trace level="3" type="System_Error">Error exception return from pipeline processing!</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
    What I have checked so far:
    1.    I have checked that the developer key is assigned to my user id
    2.    Used SWF_XI_CUSTOMIZING to make sure that all the process are green
    3.    Used sxi_cache to make sure that the BPM process has return code 0 and also reactivated it numerous times. Also checked activation log and no error there
    4.    Used SXMP_ADM_BPEAutomatic BPM Customizing to check all the entries are green
    5. There are not any message in sxmb_moni_bpe for my interface shows no message
    Input call has:
    1.    Sender Service: MFG_BPM_BusinessSystem
    2.    Sender Interface: MI_Outbound_Async
    3.    Quality Of Service: EO
    4.    Sender Name space: Name space
    5.    Input XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:BAPI_SALESORDER_GETLIST xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
       <CUSTOMER_NUMBER>0000001000</CUSTOMER_NUMBER>
       <DOCUMENT_DATE/>
       <DOCUMENT_DATE_TO/>
       <MATERIAL/>
       <MATERIAL_EVG>
          <MATERIAL_EXT/>
          <MATERIAL_VERS/>
          <MATERIAL_GUID/>
       </MATERIAL_EVG>
       <PURCHASE_ORDER/>
       <PURCHASE_ORDER_NUMBER/>
       <SALES_ORGANIZATION>1000</SALES_ORGANIZATION>
       <TRANSACTION_GROUP/>
       <SALES_ORDERS>
          <item>
          </item>
       </SALES_ORDERS>
    </ns0:BAPI_SALESORDER_GETLIST>
    Any clue, help pointer will be of great help. Just beats me, what is wrong!!
    Version:
    SAP R/3 ECC 6.0
    XI 7.0

    Hi,
    Please check these threads where they have the same issue:
    Message is not used by any processes
    Error: Message is not used by any processes
    Error: BPE_ADAPTER Message not used in any process
    Message is not used by any processes
    ---Satish

  • Exception when using  XMLDOM.appendData

    I am trying to create an xml-document containing base64 encoded data by using the xmldom packages on an 8.1.7 DB.
    Everthing works o.k. until I try to append data to an DOMCharacterData Node.This is the point where my function always ends up catching an ORA-29532 java.lang.ClassCastException exception
    I did a lot of research the last few days but did not find any similar cases.
    Does anyone have a solution or can provide hints where to find informations regarding.
    Thank you
    Edmund
    The following function is not exactly the one I am using but it also ends up in an exception!
    FUNCTION fddoc_CreateUploadDoc(pvi_Docname IN VARCHAR2, pvi_Doctype IN VARCHAR2, pvi_Data IN VARCHAR2)
    RETURN xmldom.DOMDocument
    IS
    doc                xmldom.DOMDocument;
    main_node           xmldom.DOMNode;
    root_node           xmldom.DOMNode;
    cmd_node           xmldom.DOMNode;
    document_node          xmldom.DOMNode;
    data_node          xmldom.DOMNode;
    data_cont          xmldom.DOMCharacterData;
    root_elmt           xmldom.DOMElement;
    cmd_elmt          xmldom.DOMElement;
    data_elmt               xmldom.DOMElement;
    BEGIN
         doc := xmldom.newDOMDocument;
         xmldom.setVersion(doc,'1.0');
         -- Root
         main_node := xmldom.makeNode(doc);
         root_elmt := xmldom.createElement(doc, 'ArchiveCommand');
         xmldom.setAttribute(root_elmt, 'version', '1.0');
         root_node := xmldom.appendChild( main_node, xmldom.makeNode(root_elmt));
         -- Command
         cmd_elmt := xmldom.createElement(doc,'ArchiveInsert');
         xmldom.setAttribute(cmd_elmt,'type','HYPARCHIV');
         xmldom.setAttribute(cmd_elmt,'archiveid',1);
         cmd_node := xmldom.appendChild( root_node, xmldom.makeNode(cmd_elmt));
         -- Document
         document_elmt := xmldom.createElement(doc,'Document');
         xmldom.setAttribute(document_elmt,'archiveid',1);
         xmldom.setAttribute(document_elmt, 'id','');
         xmldom.setAttribute(document_elmt, 'name',pvi_Docname);
         xmldom.setAttribute(document_elmt, 'type',pvi_Doctype);
         document_node := xmldom.appendChild(cmd_node, xmldom.makeNode(document_elmt));
         -- Data
         data_elmt := xmldom.createElement(doc,'Data');
         xmldom.setAttribute(data_elmt, 'type',pvi_Doctype);
         data_node := xmldom.appendChild(document_node, xmldom.makeNode(data_elmt));
         data_cont := xmldom.makeCharacterData(data_node);
         xmldom.appendData( data_cont,pvi_Data);/* <- this causes the Exception*/
         RETURN doc;
    END;

    Try something like requestScope or backingBeanScope.

  • Using Non-destructive filter with Nested XML data

    Hi,
    How do you use Non-destructive filter with Nested XML data?
    I am using the non-destructive filter sample with my own xml which is setup to search for the <smc></smcs> in my xml below. But when i test it it only searches the last row of the "smc". How can i make it work so it can search for repeating nodes? or does it have something to with how my xml is setup?
        <ja>
            <url>www.sample.com</url>
            <jrole>Jobrole goes here</jrole>
            <prole>Process role goes here...</prole>
            <role>description...</role>
            <prole>Process role goes here...</prole>
            <role>description....</role>
            <prole>Process role goes here...</prole>
            <role>description...</role>
            <sjc>6K8C</sjc>
            <sjc>6B1B</sjc>
            <sjc>6B1F</sjc>
            <sjc>6B1D</sjc>
            <smc>6C9</smc>
            <smc>675</smc>
            <smc>62R</smc>
            <smc>62P</smc>
            <smc>602</smc>
            <smc>622</smc>
            <smc>642</smc>
            <smc>65F</smc>
            <smc>65J</smc>
            <smc>65L</smc>
            <smc>623</smc>
            <smc>625</smc>
            <smc>624</smc>
            <smc>622</smc>
            <audience>Target audience goes here....</audience>
        </ja>
    here is the javascript that runs it.
    function FilterData()
        var tf = document.getElementById("filterTF");
        if (!tf.value)
            // If the text field is empty, remove any filter
            // that is set on the data set.
            ds1.filter(null);
            return;
        // Set a filter on the data set that matches any row
        // that begins with the string in the text field.
        var regExpStr = tf.value;
    if (!document.getElementById("containsCB").checked)
            regExpStr = "^" + regExpStr;
        var regExp = new RegExp(regExpStr, "i");
        var filterFunc = function(ds, row, rowNumber)
            var str = row["smc"];
            if (str && str.search(regExp) != -1)
            return row;
            return null;
        ds1.filter(filterFunc);
    function StartFilterTimer()
        if (StartFilterTimer.timerID)
            clearTimeout(StartFilterTimer.timerID);
        StartFilterTimer.timerID = setTimeout(function() { StartFilterTimer.timerID = null; FilterData(); }, 100);
    I really need help on this, or are there any other suggestions or samples that might work?
    thank you!

    I apologize, im using Spry XML Data Set. i guess the best way to describe what im trying to do is, i want to use the Non-desctructive filter sample with the Spry Nested XML Data sample. So with my sample xml on my first post and with the same code non-destructive filter is using, im having trouble trying to search repeating nodes, for some reason it only searches the last node of the repeating nodes. Does that make sense? let me know.
    thank you Arnout!

Maybe you are looking for

  • Purchase order (MM)

    Hello experts I want some interactive reports on purchase orders. also if u can give for purchase order reqisition. thanx in advanced

  • Playlists on EA4500 Media Server

    Does anybody know how to get playists to work on the EA4500 Media Server? I have the Music folder share working with a Roku Soundbridge, so now would like to copy my iTunes playlists to this folder as well. I've tried creating a .m3u file in the Musi

  • How at add closd function in the JButton??

    Hi, sir: I hope to add a closd function in the JButton, ie, like a JPanel or JFrame, there is a "X" sign icon on the right upper coner, when we click this X sign, whole window or JPanel or JFrame will be closed, here I hope to add a "x" sign in JButt

  • Used Imac G4 errors on boot

    I just picked up a used iMac G4 1.25ghz. When I picked it up it worked great, it had booted to a external drive (the internal one had been removed). I put the new drive in and now when it boots it either doesn't do anything (no screen no power to USB

  • Customer login problem

    Customer account [email protected] has used the password reset and does get the emails but the passwords do not work. Had customer delete all cookies and files, shutdown all browsers and restart, still could not get in. Please email him when his acco