Problem replacing Null nodes with real values in XML documents...

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
Our friends in Java land are insisting on passing data between Java and PL/SQL using fairly small XML documents (don't ask). I then need to extract the input parameter values and pass them, on to the stored procedures that actually do the work. These return a result which needs to be returned to the java layer in the output XML document.
Here is a cut down version of the input XML...
<ParameterList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameter>
<Id>1</Id>
<Result xsi:nil="true"/>
</Parameter>
<Parameter>
<Id>2</Id>
<Result xsi:nil="true"/>
</Parameter>
</ParameterList>
and this is an example of what I am expected to return...
<ParameterList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameter>
<Id>1</Id>
*<Result>SUCCESS</Result>*
</Parameter>
<Parameter>
<Id>2</Id>
*<Result>WARNING</Result>*
</Parameter>
</ParameterList>
i.e. I am expected to replace the value of the Result node with a string indicating the succes or otherwise of the underlying PL/SQL process.
I am extracting the input values using the DBMS_XMLDOM functions and naively assumed that DBMS_XMLDOM.SETNODEVALUE could be used to update the value in the Result node - It didn't work so I resorted to reading the documentation which revealed that it will not work for a null node.
Am I going to have to use XSLT to generate the output XML from the Input and incorprate the result? Or is there a simpler way?
I have used XSLT in Oracle before and still have the nervous tick...

Thanks A Non,
With your suggestion and a bit of help from the w3schools.com xml dom tutorial I eventually managed to work out how to do this.
Here is the code (with all my debug stuff in so it looks worse than it is...)
create or replace
PROCEDURE ExtractXMLValues (p_inXml IN CLOB ) IS
l_string VARCHAR2(4000);
l_value VARCHAR2(4000);
l_DOM_doc dbms_xmldom.DOMDocument;
l_DOM_node dbms_xmldom.DOMNode;
l_new_DOM_node dbms_xmldom.DOMNode;
l_new_element dbms_xmldom.DOMElement;
l_new_DOM_nodevalue dbms_xmldom.DOMNode;
l_value_Node dbms_xmldom.DOMNode;
l_parameter_Node dbms_xmldom.DOMNode;
--l_DOM_nodelist    dbms_xmldom.DOMNodeList;
l_Result_DOM_node dbms_xmldom.DOMNode;
BEGIN
l_DOM_doc := dbms_xmldom.newDomDocument(p_inXml);
l_DOM_node := dbms_xmldom.makeNode(l_DOM_doc);
dbms_xmldom.writeToBuffer(l_DOM_node, l_string);
dbms_output.put_line('1 ' || l_string);
l_parameter_node := dbms_xslprocessor.selectSingleNode(l_DOM_node,'//Parameter');
-- get the current values in the XML document for Id and Result
l_Result_DOM_node := dbms_xslprocessor.selectSingleNode(l_DOM_node,'//Id');
l_value_Node := dbms_xmldom.getFirstChild(l_Result_DOM_node);
l_value := dbms_xmldom.getnodevalue(l_value_Node);
dbms_xmldom.writeToBuffer(l_Result_DOM_node, l_string);
dbms_output.put_line('2 ' || l_string || ' : ' || l_value);
l_Result_DOM_node := dbms_xslprocessor.selectSingleNode(l_DOM_node,'//Result');
l_value_Node := dbms_xmldom.getFirstChild(l_Result_DOM_node);
l_value := dbms_xmldom.getnodevalue(l_value_Node);
dbms_xmldom.writeToBuffer(l_Result_DOM_node, l_string);
dbms_output.put_line('3 ' || l_string || ' : ' || l_value);
-- create new Result node
l_new_DOM_node      := dbms_xmldom.makenode(dbms_xmldom.createElement(l_DOM_doc, 'Result'));
dbms_xmldom.writeToBuffer(l_new_DOM_node, l_string);
dbms_output.put_line('4 New node : ' || l_string);
-- create a value for it
l_new_DOM_nodevalue := dbms_xmldom.makenode(dbms_xmldom.createtextnode(l_DOM_doc, 'SUCCESS'));
dbms_xmldom.writeToBuffer(l_new_DOM_nodevalue, l_string);
dbms_output.put_line('5 New node value : ' || l_string);
-- add the value to the new Result node
l_new_DOM_nodevalue := dbms_xmldom.appendchild(l_new_DOM_node,  l_new_DOM_nodevalue);
dbms_xmldom.writeToBuffer(l_new_DOM_node, l_string);
dbms_output.put_line('6 New node : ' || l_string);
-- replace the old node with the new one
l_Result_DOM_node := dbms_xmldom.replaceChild(l_parameter_node, l_new_DOM_node, l_Result_DOM_node);
dbms_xmldom.writeToBuffer(l_parameter_node, l_string);
dbms_output.put_line('6 parameter node : ' || l_string);
dbms_xmldom.writeToBuffer(l_DOM_node, l_string);
dbms_output.put_line('7 Updated document ' || l_string);
dbms_xmldom.freeDocument(l_DOM_doc);
END ExtractXMLValues;
and the output...
1 <ParameterList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameter>
<Id>1</Id>
<Result xsi:nil="true"/>
</Parameter>
</ParameterList>
2 <Id>1</Id> : 1
3 <Result xsi:nil="true"/> :
4 New node : <Result/>
5 New node value : SUCCESS
6 New node : <Result>SUCCESS</Result>
6 parameter node : <Parameter>
<Id>1</Id>
<Result>SUCCESS</Result>
</Parameter>
7 Updated document <ParameterList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameter>
<Id>1</Id>
*<Result>SUCCESS</Result>*
</Parameter>
</ParameterList>
One question, why do the dbms_xmldom functions return the Old value? I was expecting the returned value to be the updated node.
Edited by: Lone voice on May 14, 2009 11:24 AM

Similar Messages

  • I am having the same problem I think.  With mobileme you simply copy documents to the idisk folder and then synch.  I cannot seem to sink that folder anymore.  Any idea as to how I can simply copy folders to icloud and then access the MS Word and PDF file

    I am having the same problem I think.  With mobileme you simply copy documents to the idisk folder and then synch.  I cannot seem to sink that folder anymore.  Any idea as to how I can simply copy folders to icloud and then access the MS Word and PDF files on my iphone?

    Apple never bopthered to explain that this would happen
    Your iDisk is still accessible after moving to iCloud in exactly the same way as before. Nothing is deleted until June 30th 2012.
    , so I could easily have lost ALL of the files I kept on iDisk.
    No, you couldn't. Firstly, nothing was deleted from your iDisk. Secondly, any files stored on your iDisk should never be your only copy. Even if your iDisk spontaneously combusted, you should keep local backups elsewhere.
    Does Apple WANT people to move their storage elsewhere and stop paying Apple for it?
    Yes. Apple doesn't provide such a service anymore, nor are you paying them for it.
    Apple has made no effort to suggest remedies for the problem it has given iDisk users
    They've provided instructions on how to download your files from your iDisk. What you do with them after that is your choice.

  • Use DOM to get the element value of XML document?

    I can not to use the method getNodeValue to get the element value of XML document. How can I do for it?
    For example, for element
    <address>125 Smith Avenue</address>
    how to get the value "125 Smith Avenue" by using DOM?
    Thanks

    Thanks for all of you.
    The code indicates that I need to get the node by tag name. If I do not know the distribution of the elements and want to traverse all nodes. If the node contains value, I retrieve the value. How to implement the general case.
    For example, my XML file represent a directory hierarchy and looks like
    <root>
    <usr>
    <user>user1
    <file>file1</file>
    <file>file2</file>
    </user>
    <user>user2
    <file>file1</file>
    <file>file2</file>
    <file>file3</file>
    <file>file4</file>
    </user>
    </usr>
    </root>

  • ORA-01400 - not null column with default value and item with authorization

    I've searched - I would think someone has run into this. APEX 3.0.0.00.20 - I've created a simple form on a table. One of the column is a not null column with a default value. I have a select list on that item, but it has security on it - authorization scheme. So, it checks the user and if that user isn't of the right role, it will not even display that item. However, APEX appears to still send in the column in its sql! So, the default value is useless, it sends in null each time. Even if I set the default at the Item level, I get null. Argg. That's got to be a bug...
    In debug, I do not see the item listed at all. It's not used. That's fine - but why is it trying to insert the value? I would think it would leave it off??? I think because the item is associated with a database column. But, getting around this is ugly. Having to create a hidden item for each one, and then check to see if I need to take the list value... horrible. Any way to get around this???

    I should add - I guess I can always put my own custom process in to replace the DML. Just seems like a simple thing - if the value doesn't appear on the debug, isn't set with any default value... don't include it in the DML.

  • Replacing Window Title with other value

    Hi to everyone
    Can anyone tell me how can I replace the window title with other values...for example with active record...mean client name should appear instead of window title.
    Thanks in advance

    Here is the code I use from a simple form. You can see it handles three separate environments, Client/Server, Web separate frame, and Web inside browser window.
    I like to remove the "Oracle Forms Runtime" from the main window, only in Client/Server, you cannot remove the brackets. So you are left with - [ Your Title ]Here is the code. It can be put into either the Pre-Form or When-New-Form-Instance trigger. But note that once you do this, EVERY form must set its title, or the one you set last will show up on all your subsequent forms:
        DECLARE
          WINDOW_ID        WINDOW := FIND_WINDOW('WINDOW0');
          WTitle           Varchar2(100) := 'My Test Form';
        BEGIN
          Set_Window_Property(Window_Id,Window_State,Maximize);
          If Get_Application_Property(User_Interface) = 'WEB' then
            --Web forms:  set MDI title, erase W0 title.
            Set_Window_Property(Window_Id,Title,' ');
            Set_Window_Property(Forms_MDI_Window,Title,' ' || WTitle);
            --- Check if running SeparateFrame=False (form within browser)
            If get_window_property(forms_mdi_window,title) is null then
              --SeparateFrame=False:  running inside browser window.
              --Cannot set browser title; need to set Window0 title
              Set_Window_Property(Window_Id,Title,' ' || WTitle);
            end if;
          Else -- client/server forms
            Set_Window_Property(Forms_MDI_Window,Title,' ');
            Set_Window_Property(Window_Id,Title,' '||WTitle||' ');
          End if;
        END;

  • Problem populating date dimension with correct values

    Hi all,
    I have a 'simple' problem, but can't get it solved! The YTD calculations in the cube don't 'reset' at the right moment in time (they should 'reset' on the FISCAL year, but it actually seems to happen on the normal calendar year).
    Our dimensions and cubes are MOLAP. There is a relational table, containing columns with values for both a CALendar hierarchy as well as for a FISCAL year hierarchy. This table populates the date dimension (only the fiscal hierarchy as in MOLAP we only have a fiscal hierarchy). The result looks correct in the data viewer.
    The cube is populated from relational sources as well. One view provides the measure values and the CODE (business identifiers) values for each dimension involved. In case of the date dimension, it provides the code value for the involved level at which we load the cube (month).
    I made a very simple testcase with only 1 dimension (date) and 1 small cube. The cube uses only the date dimesion (to load cube on the fiscal hierarchy at month level) and has 1 base measure that is loaded with a simple number and 1 calculated measure that calculates the YTD value for this base measure. The calculated measure is added in the OWB cube designer using button "Generate Calculated Measures" and choosing the "Year to Date" function.
    When populating the cube and using the data viewer to check the results, the YTD measure values don't 'reset' at the fiscal year end. They seem to reset at the normal CALendar year end!?
    After some testing, I have concluded it has to do with the values I supply to populate the date dimension, but I can't figure out what the modification should be and I can't find any examples anywhere.
    Does anyone out there have a working YTD calculation in MOLAP?
    Any help much appreciated.
    Regards,
    Ed

    Sorry David, I am not sure I've got this right yet. I am looking at using the cumsum function, but I am not sure how to apply this. That is, I can see examples (cumsum(measure, total_dim, reset_dim)), but I think I cannot put such formula directly into the expression editor for a cube measure in OWB?
    Until now I have been using the standard available calculated measures in the OWB measure editor and I think they insert an xml template? I'll get the Excel Calculation Tool from OTN, to see if I can create the correct formula and paste that in OWB in the expression editor for the measure. (Does that tool need a ROLAP workspace or does it need / can it work with a MOLAP workspace?)
    Thanks and regards,
    Ed
    Edited by: EdSp on Jan 13, 2009 1:57 PM
    I have downloaded the Excel sheet and can see how it works, but it seems to "insert" the calculated measures straight into the AW. However we deploy the AW from OWB so I will be looking at getting something to enter/paste in the expression editor of OWB...

  • Delete a node containing a child node with specific value

    Hello,
    I wanted to know how to delete a node which contains specific value in one of its child node.
    Here is the xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <rows>
         <ROW>
              <part_num_ref ID="100124">1</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">2</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">3</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">4</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">5</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">6</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">7</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">8</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">9</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">10</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">11</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">12</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">13</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">14</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">15</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">16</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">17</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
    </rows>
    I would like to delete one of the node <ROW> which contains the value 1 for the child node <part_num_ref >
    Is it possible?
    Thanks in advance for your answers.
    Regards,
    Stessy Delcroix

    The following is a possibility on database version 10.2.x (what database version are you using?):
    Example from XMLDB Developers Guide 10.2
    Example 4-26 Deleting LineItem Element Number 222
    SELECT extract(OBJECT_VALUE,
                   '/PurchaseOrder/LineItems/LineItem[@ItemNumber="222"]')
      FROM purchaseorder
      WHERE existsNode(OBJECT_VALUE,
                       '/PurchaseOrder[Reference="AMCEWEN-20021009123336171PDT"]')
            = 1;
    EXTRACT(OBJECT_VALUE,'/PURCHASEORDER/LINEITEMS/LINEITEM[@ITEMNUMBER="222"]')
    <LineItem ItemNumber="222">
      <Description>The Harder They Come</Description>
      <Part Id="953562951413" UnitPrice="22.95" Quantity="1"/>
    </LineItem>
    1 row selected.
    UPDATE purchaseorder
      SET OBJECT_VALUE =
          deleteXML(OBJECT_VALUE,
                    '/PurchaseOrder/LineItems/LineItem[@ItemNumber="222"]')
      WHERE existsNode(OBJECT_VALUE,
                       '/PurchaseOrder[Reference="AMCEWEN-20021009123336171PDT"]')
            = 1;
    SELECT extract(OBJECT_VALUE,
                   '/PurchaseOrder/LineItems/LineItem[@ItemNumber="222"]')
      FROM purchaseorder
      WHERE existsNode(OBJECT_VALUE,
                       '/PurchaseOrder[Reference="AMCEWEN-20021009123336171PDT"]')
            = 1;
    EXTRACT(OBJECT_VALUE,'/PURCHASEORDER/LINEITEMS/LINEITEM[@ITEMNUMBER="222"]')
    1 row selected.

  • Problem replacing an as5200 with an as5300 device

    I'm replacing an as5200 with an as5300 device.
    Copying and correcting to the new interface naming the configuration from the old device to the new one the inbound connections works fine but the outbound dial on demand connections does NOT works even the dialer and the aaa configuration are the same.
    Debugging the ppp events I can see the "DIALER-6-BIND: Interface Virtual-Access1 bound to profile DialerXX" is NOT received in the new device.
    Attached the new configuration with password replaced for security reason.
    can you help me ?
    Thanks in advance.

    check out the following link for information on Troubleshooting Dial Technology Connectivity :
    http://www.cisco.com/en/US/tech/tk801/tk133/technologies_tech_note09186a008009469d.shtml

  • Can you add People Picker with multiple values to Word Document using Quick Parts?

    Hi all, I've been trying to develop a form in Word that takes a bunch of metadata from the SharePoint library. Most of it works okay, but when I try to add any fields that have been set up to take multiple entries in a people picker, they don't show up
    in the add quick parts list. Any ideas, or is this a limitation?

    Hi NREL,
    According to your description, my understanding is that the people picker column with multiple values was missing in Word Quick Parts.
    This is by design that we are unable to use the fields which is allowed multiple selections.
    As a workaround, you can use a text field(Single line of text) to store the multiple values of the people column. When you create a document, start a workflow to update the text field using the values of the people column, then use the
     text field in Word Quick Parts.
    You can do as the followings:
    Open your library, and create a new column using Single line of text.
    Open your site with SharePoint 2010 Designer, create a workflow based on your library.
    Add the action “Set Field in CurrenItem”, and set it like the screenshot.
    Set the Start Options is “Start workflow automatically when an item is created”.
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Putting float/int values in xml document

    I am using Oracles XML Parser for C (ver 9i). I have a float or int value which i want to put in the xml document that I am creating. The part of the code is as below..
    char str_l[50];
    float height_l;
    elem_l = createElement(ctx_i, (oratext *)"HEIGHT");
    if (!appendChild(ctx, parent_l, elem_l))
    printf("Error Creating Element\n");
    return FAILURE;
    parent_l = elem_l;
    height_l = 15.7;
    sprintf(str_l, "%f", height_l);
    elem_l = createTextNode(ctx_i, str_l);
    if (!appendChild(ctx, parent_l, elem_l) )
    printf("Error Creating Element\n");
    return FAILURE;
    This put 0.00000 as the value of height in the document. ie the o/p is
    <HEIGHT>0.00000</HEIGHT>
    Can anyone help me out with this.
    Thanks and regards
    Umesh

    I am using Oracles XML Parser for C (ver 9i). I have a float or int value which i want to put in the xml document that I am creating. The part of the code is as below..
    char str_l[50];
    float height_l;
    elem_l = createElement(ctx_i, (oratext *)"HEIGHT");
    if (!appendChild(ctx, parent_l, elem_l))
    printf("Error Creating Element\n");
    return FAILURE;
    parent_l = elem_l;
    height_l = 15.7;
    sprintf(str_l, "%f", height_l);
    elem_l = createTextNode(ctx_i, str_l);
    if (!appendChild(ctx, parent_l, elem_l) )
    printf("Error Creating Element\n");
    return FAILURE;
    This put 0.00000 as the value of height in the document. ie the o/p is
    <HEIGHT>0.00000</HEIGHT>
    Can anyone help me out with this.
    Thanks and regards
    Umesh

  • Performance issues with FDK in large XML documents

    In my current project with FrameMaker 8 I'm experiencing severe performance issues with some FDK API calls.
    The documents are about 3-8 MBytes in size. Fortmatted they cover 150-250 pages.
    When importing such an XML document I do some extensive "post-processing" using FDK. This processing happens in Sr_EventHandler() during the SR_EVT_END_READER event. I noticed that some FDK functions calls which modify the document's structure, like F_ApiSetAttribute() or F_ApiNewElementInHierarchy(), take several seconds, for the larger documents even minutes, to complete one single function call. I tried to move some of these calls to earlier events, mostly to SR_EVT_END_ELEM. There the calls work without a delay. Unfortunately I can't rewrite the FDK client to move all the calls that are lagging to earlier events.
    Does anybody have a clue why such delays happen, and possibly can make a suggestion, how to solve this issue? Thank you in advance.
    PS: I already thought of splitting such a document in smaller pieces by using the FrameMaker book function. But I don't think, the structure of the documents will permit such an automatic split, and it definitely isn't an option to change the document structure (the project is about migrating documents from Interleaf to XML with the constraint of keeping the document layout identical).

    FP_ApplyFormatRules sounds really good--I'll give it a try on Monday. Wonder how I could miss it, as I already tried FP_Reformatting and FP_Displaying at no avail?! By the way, what is actually meant with FP_Reformatting (when I used it I assumed it would do exactly what FP_ApplyFormatRules sounds to do), or is that one another of Lynne's well-kept secrets?
    Thank's for all the helpful suggestions, guys. On Friday I already had my first improvements in a test version of my client: I did some (not all necessary) structural changes using XSLT pre-processing, and processing went down from 8 hours(!) to 1 hour--Yeappie! I was also playing with the idea of writing a wrapper to F_ApiNewElementInHierarchy() which actually pastes an appropriate element created in a small flow on the reference pages at the intended insertion location. But now, with FP_ApplyFormatRules on the horizon, I'm quite confident to get even the complicated stuff under control, which cannot be handled by the XSLT pre-processing, as it is based on the actual formatting of the document at run-time and cannot be anticipated in pre-processing.
    --Franz

  • Extracting Values from XML-Document in pl/sql

    Hello!
    I need to extract the content of the following extract:
    <ns1:OXERPGetArticlesResponse xmlns:ns1="OXERPService">
    <ns1:OXERPGetArticlesResult>
    <ns1:OXERPType>
    <ns1:aResult>
    <ns1:ArrayOfString>
    <ns1:string>OXID</ns1:string>
    <ns1:string>531f91d4ab8bfb24c4d04e473d246d0b</ns1:string>
    </ns1:ArrayOfString>
    <ns1:ArrayOfString>
    <ns1:string>OXARTNUM</ns1:string>
    <ns1:string>0601-85-069</ns1:string>
    </ns1:ArrayOfString>
    <ns1:ArrayOfString>
    <ns1:string>OXPRICE</ns1:string>
    <ns1:string>100.5</ns1:string>
    </ns1:ArrayOfString>
    </ns1:aResult>
    <ns1:blResult>true</ns1:blResult>
    <ns1:sMessage/>
    </ns1:OXERPType>
    <ns1:OXERPType>
    <ns1:aResult>
    <ns1:ArrayOfString>
    <ns1:string>OXID</ns1:string>
    <ns1:string>531a8af7d9a9a5bb53b65a2b9a5356e5</ns1:string>
    </ns1:ArrayOfString>
    <ns1:ArrayOfString>
    <ns1:string>OXARTNUM</ns1:string>
    <ns1:string>0601-85-069-1</ns1:string>
    </ns1:ArrayOfString>
    <ns1:ArrayOfString>
    <ns1:string>OXPRICE</ns1:string>
    <ns1:string>89.9</ns1:string>
    </ns1:ArrayOfString>
    </ns1:aResult>
    <ns1:blResult>true</ns1:blResult>
    <ns1:sMessage/>
    </ns1:OXERPType>
    </ns1:OXERPGetArticlesResult>
    </ns1:OXERPGetArticlesResponse>
    The output should be:
    OXID OXARTNUM OXPRICE
    531f91d4ab8bfb24c4d04e473d246d0b 0601-85-069 100.5
    531a8af7d9a9a5bb53b65a2b9a5356e5 0601-85-069-1 89.9
    The count of rows and columns is variable.
    I want to do this by using xmltype.extract but I found no way to create a loop over the content of the xml document.
    Hopefully someone can help me!
    Regards
    Herbert

    OK, then you should be able to use something like :
    SQL> var xmldoc clob;
    SQL> begin
      2   :xmldoc := '<ns1:OXERPGetArticlesResponse xmlns:ns1="OXERPService">
      3  <ns1:OXERPGetArticlesResult>
      4  <ns1:OXERPType>
      5  <ns1:aResult>
      6  <ns1:ArrayOfString>
      7  <ns1:string>OXID</ns1:string>
      8  <ns1:string>531f91d4ab8bfb24c4d04e473d246d0b</ns1:string>
      9  </ns1:ArrayOfString>
    10  <ns1:ArrayOfString>
    11  <ns1:string>OXARTNUM</ns1:string>
    12  <ns1:string>0601-85-069</ns1:string>
    13  </ns1:ArrayOfString>
    14  <ns1:ArrayOfString>
    15  <ns1:string>OXPRICE</ns1:string>
    16  <ns1:string>100.5</ns1:string>
    17  </ns1:ArrayOfString>
    18  </ns1:aResult>
    19  <ns1:blResult>true</ns1:blResult>
    20  <ns1:sMessage/>
    21  </ns1:OXERPType>
    22  <ns1:OXERPType>
    23  <ns1:aResult>
    24  <ns1:ArrayOfString>
    25  <ns1:string>OXID</ns1:string>
    26  <ns1:string>531a8af7d9a9a5bb53b65a2b9a5356e5</ns1:string>
    27  </ns1:ArrayOfString>
    28  <ns1:ArrayOfString>
    29  <ns1:string>OXARTNUM</ns1:string>
    30  <ns1:string>0601-85-069-1</ns1:string>
    31  </ns1:ArrayOfString>
    32  <ns1:ArrayOfString>
    33  <ns1:string>OXPRICE</ns1:string>
    34  <ns1:string>89.9</ns1:string>
    35  </ns1:ArrayOfString>
    36  </ns1:aResult>
    37  <ns1:blResult>true</ns1:blResult>
    38  <ns1:sMessage/>
    39  </ns1:OXERPType>
    40  </ns1:OXERPGetArticlesResult>
    41  </ns1:OXERPGetArticlesResponse>';
    42  end;
    43  /
    Procédure PL/SQL terminée avec succès.
    SQL> SELECT x1.rec_id
      2       , x2.col_name
      3       , x2.col_value
      4  FROM XMLTable(
      5        XMLNamespaces('OXERPService' as "ns1"),
      6        '/ns1:OXERPGetArticlesResponse/ns1:OXERPGetArticlesResult/ns1:OXERPType/ns1:aResult'
      7        passing xmltype(:xmldoc)
      8        columns rec_id for ordinality
      9              , rec_xml xmltype path 'ns1:ArrayOfString'
    10       ) x1,
    11       XMLTable(
    12        XMLNamespaces('OXERPService' as "ns1"),'/ns1:ArrayOfString'
    13        passing x1.rec_xml
    14        columns col_name  varchar2(30) path 'ns1:string[1]'
    15              , col_value varchar2(30) path 'ns1:string[2]'
    16       ) x2
    17  ;
        REC_ID COL_NAME                       COL_VALUE
             1 OXID                           531f91d4ab8bfb24c4d04e473d246d
             1 OXARTNUM                       0601-85-069
             1 OXPRICE                        100.5
             2 OXID                           531a8af7d9a9a5bb53b65a2b9a5356
             2 OXARTNUM                       0601-85-069-1
             2 OXPRICE                        89.9
    6 ligne(s) sélectionnée(s).You mentioned that the number of column(s) is not known in advance. That's gonna be a problem to present the data column-wise.
    Version 11g has the PIVOT feature, but still you have to know how many columns there will be in the result set.
    How are you going to use the data after extraction?
    Maybe we could advise some other techniques more relevant for your requirement.

  • Call Standard Text by report replacing the variables with their values

    Hi,
    I have a requirement to call a standard text from a report.
    Following is the text present in standard text.
    &PTXT1-ENAME& will attend for interview
    on &MEMOACT-PLDAT& at &MEMOACT-PLTIM&.
    I am doing it by using READ_TEXT. But READ_TEXT reads the entire text as it is.
    Is there any way I could retrieve the standard texts with  &PTXT1-ENAME& replaced by the value of  PTXT1-ENAME in report. And similarly &MEMOACT-PLDAT& replcaed with its actual value.
    Any pointers in this regard would be helpful.
    Points will be awarded.
    Regards,
    Mayank Agarwal

    Hi,
    In the Text
    &PTXT1-ENAME& will attend for interview
    on &MEMOACT-PLDAT& at &MEMOACT-PLTIM&.
    do not use the * as a paragrapgh , use /: as the paragraph
    Regards
    Sudheer

  • How to replace namespace tag with new value using -JAVA MAPPING

    Hi Guys,
    I need to replace namespace Tag in Target xml with a new value.
    For Eg: My namespace Tag is - <ns0:TestHeader xmlns:ns0="http://0020.TestHeader.SS.com">
    I want My target xml to have value- <ns0:TestHeader>
    How can i achieve it using JAVA mapping?
    Can you provide me the code to do so.

    Sarjana,
    Not well-formed XML is only possible by Java Mapping. Please use below replace logic in Java map.
    inputContent.replaceAll("<ns0:TestHeader xmlns:ns0=\"http://0020.TestHeader.SS.com\">", "<ns0:TestHeader>");
    Link1, Link2.

  • Problem Regarding Invoice Booking with freight value

    Hi,
      I have RBKP , RSEG, BKPF, BSEG tables.
    I can fetch data from above tables for invoce booking values.
    But i can't fetch freight and other charges against particular  invoice.So i am getting purchase rate of material without freight
    in case of same purchase order and in same item.
    one example,
    Company purchase one item based on PO today.
    after two days Company purchase same item bsed on same PO.Now user make entry of invoice with frieght.Now in two invoice how can i find freight of one invoice.
    So kindly suggest how can i link invoice with freight.

    Hi,
    I tried in my system and its working fine allowing to change the amount in MIRO. My doubt is whether it was client requirement during implementation to set such an error message..
    It might has something to do with the Partial Inv. field in the Account assignment category in PO item level..
    Are u using Derive from account assignment category???
    Please check this answered thread
    Error Message M8575 - Partial Invoice not possible
    Please check
    sBk
    Edited by: Sujithbk on Dec 14, 2011 5:56 AM
    Edited by: Sujithbk on Dec 14, 2011 5:58 AM

Maybe you are looking for

  • Looking for a standalone application/system menu

    Most (all?)  desktop environments features some kind of application menu in the panel. But for the people running more lightweight environments (like just a tiled wm) have no reason to have an extra panel around just for the menu. I know about applic

  • MacBook Pro hard disk stops and starts

    Why does the hard disk on MacBook Pro stop and start every 15 minutes or so? All operations suddenly stop for five to ten seconds during the spin down. I don't recall this happening in OS 10.5. The preference "Put the hard disk to sleep when possible

  • Playlist song order question

    do the answers in the link below still apply since we have had many upgrades since the time of the post? thanks. I am having the same problem again. When I click on the column heading for the number column, it makes the album artwork appear toggle ba

  • RMI with SSL problem (cross post under RMI too)

    Hi, I'm having problems using RMI with SSL. I posted in the RMI forum originally but now realise the problems are with the SSL really. Perhaps someone who follows this forum could help. See post: http://forum.java.sun.com/thread.jsp?forum=58&thread=4

  • Nokia N93 (firmware V20) issues

    Hello, I bought (on February 1st) a Nokia N93 that I quickly upgraded to firmware V20. Even with that firmware, I still have some very annoying issues : (1) I expected to personnalize my ring tones on the calling number basis, like on my previous Nok