Loop through xml and update the value

I have the following xml table. I need to update the Field which name="data"
<?xml version="1.0" encoding="ISO-8859-1"?>
<Root name="xyz">
<Row id="1">
<Field name="data">456</Field>
<Field name="time">2005-02-08 10:43:51</Field>
</Row>
<Row id="2">
<Field name="data">123</Field>
<Field name="time">2005-02-08 10:43:16</Field>
</Row>
</Root>
After update, the table should look like this
<?xml version="1.0" encoding="ISO-8859-1"?>
<Root name="xyz">
<Row id="1">
<Field name="data">abc</Field>
<Field name="time">2005-02-08 10:43:51</Field>
</Row>
<Row id="2">
<Field name="data">edf</Field>
<Field name="time">2005-02-08 10:43:16</Field>
</Row>
</Root>
How do I update the value through java program? I do not want to load the data to database to update the value. The constrain is that i must have the value updated in java application before I loaded it to the database.
Please any advise?
Thank you!

Use a DOM parser to parse the xml document...you will get a Document object, which you can use XPath or traverse the DOM tree and perform the updating.

Similar Messages

  • How to read and update the value of property file

    Hi,
    I am not able read the values from property file.
    Please tell me how to read and update the values from property file using Properties class
    This is my property file : - Config.properties its located in D:\newfolder
    Values
    SMTP = localhost
    Now i need to change the value of the SMTP
    New value :
    SMTP =10.60.1.9
    Pls Help me
    Thanks
    Merlin Rosina,

    Post a small (<1 page) example program that forum members can copy and run that demonstrates your problem.

  • Looping through elements and assigning the proper attributes

    So I'm trying to loop through all my xml elements. I then
    want to loop through an element and an elements child and all
    attributes assigned inside. Does this make sense, I hope so? This
    is for an on going Cascading menu I have been building. So
    basically every element inside an element would be a submenu of a
    menu. Here is what I have....

    Okay. Much better subject line this time. :)
    You apparently know what a factorial is. You need to multiply the input by all numbers less than it (except for special case of 0! [but, then, you tell them to enter a number between 1 and 12]).
    You don't want your loop to be "while (true)". You can either start at 1 and work your way up to the input number, or start at the input number and work your way down. You may want a 'for' loop instead of a 'while' loop.
    In this (and most cases), think about how you would calculate factorials manually. Write it down in English. Then, translate it to code.
    You've been working on factorials for a while now. You haven't found the algorithm yet?

  • Looping through xml in cfscript

    Ok, I can loop through xml to get the value of any tag and
    output it to a variable. But the problem for me is getting the
    child tags of a specific tag to loop out grouped together. For
    instance, below I would want to group the xml like this.
    Year: 90
    Employer: Bank
    Wages: 2000.00
    Year: 90
    Employer: Gas Station
    Wages: 1000.00
    Ok, I can loop through xml to get the value of any tag and
    output it to a variable. But the problem for me is getting the
    child tags of a specific tag to loop out grouped together. For
    instance, below I would want to group the xml like this.
    Year: 91
    Employer: Bank
    Wages: 2500.00
    Year: 91
    Employer: Gas Station
    Wages: 1500.00
    <year value="90">
    <employer name="bank">
    <wages>2000.00</wages>
    </employer>
    <employer name="gas station">
    <wages>1000.00</wages>
    </employer>
    </year>
    <year value="91">
    <employer name="bank">
    <wages>2500.00</wages>
    </employer>
    <employer name="gas station">
    <wages>1500.00</wages>
    </employer>
    </year>
    Thanks in advanced,
    Anthony

    It will always be sorted by year and by employer. I was just
    trying to get the basic concept of the looping and would figure the
    rest out myself. But I would want it to look like this.
    Employer: Bank
    Year: 90 Wages: 2000.00
    Year: 91 Wages: 2500.00
    Employer: Gas Station
    Year: Wages: 1000.00
    Year: Wages: 1500.00
    Thanks in advance.

  • How to update and use the values of variables of another class

    I can we update or use the values of the variables of another class. For example, if we have class A
    public class A //(situated in package view)
    public s0,s1;
    public void runFunction()
    ...some coding and proceedings
    s0="Hi";s1"Hello";
    ......some coding
    RequestDispatcher dispatcher = request.getRequestDispatcher("/MainUser.jsp?alert=F");
    dispatcher.forward(request, response);
    ARunner.jsp
    <jsp:useBean id="a" class="view.A" scope="session"/>
    <%
    a.runFunction();
    %>
    MainUser.jsp
    <jsp:useBean id="a" class="view.A" scope="session"/>
    <%
    System.out.println("S0:"+a.s0+" S1:"+a.s1); //should print S0:Hi S1:Hello, but printing S0:null S1:null
    %>
    A.class has some procedures and String variables which can be updated and later can be used in JSP pages. The project starts with ARunner.jsp which uses the A.class and updates the values of string variables s0 and s1of A to hi and hello respectively.And then redirects the page to MainUser.jsp.
    Now what I want is ,when I call those string variables(s0 & s1 of A.class) in any another jsp likeMainUser.jsp it should give me the value of hi and hello respectively not null as it is giving right now. Could you refine the coding for this one?

    public class A //(situated in package view)
    public String s0,s1;
    public void runFunction()
    ...some coding and proceedings
    s0="Hi";s1"Hello";
    ......some coding
    RequestDispatcher dispatcher = request.getRequestDispatcher("/MainUser.jsp");
    dispatcher.forward(request, response);
    ARunner.jsp
    <jsp:useBean id="a" class="view.A" scope="session"/>
    <%
    a.runFunction();
    %>
    MainUser.jsp
    <jsp:useBean id="a" class="view.A" scope="session"/>
    <%
    System.out.println("S0:"+a.s0+" S1:"+a.s1); //should print S0:Hi S1:Hello, but printing S0:null S1:null
    %>
    giving code again to remove the typing errors. Please guide.

  • How to update the value of setter and getter..!!

    Hii all i am developing an portal application in which i display the metadata information related to a document(Stored in UCM) in a popup in my application...
    The user can also update the information through the application.
    in my popup i have a trh : table layout in which i have a Select Onechoice field as
    <trh:cellFormat id="xcfcSecurityGrp">
    <af:selectOneChoice value="#{MetaDataFields.DSecurityGroup}" id="ddldSecurityGroup" showRequired="false"
    autoSubmit="true"
    immediate="true">
    <f:selectItems value="#{ContentDataBean.TSecurityGrpList}" id="si1"/>
    </af:selectOneChoice>
    </trh:cellFormat>
    The MetaDataFields.DSecurityGroup show the current security group on document
    and
    ContentDataBean.TSecurityGrpList provide the user with the list of security group to update.
    The current security group i am getting through a map which consist of metadata information for a document :-
    public void setDSecurityGroup(String dSecurityGroup) {
    this.dSecurityGroup = dSecurityGroup;
    public String getDSecurityGroup() throws IdcClientException, IOException {
    Map<String,String> mapValue=ep.getDocumentPropertiesSystem();
    dSecurityGroup=mapValue.get("dSecurityGroup");
    return dSecurityGroup;
    The problem is that whenever i am updating the value for the security group, i am getting the old value, the problem is that i have to every time get value from the map only as it consist metadata information for the current selected document..
    Is there is any way through which i can update the value for this field..??
    Thanks
    JDeveloper - 11.1.1.6.0

    Hi,
    Try binding ValueChangeListener on the selectList. Also set autoSumit property to true.
    Thanks,
    Pandu

  • How to update the value in xml file using transformer after setNodeValue

    Hi,
    This is my code
    I want to set update the values in xml file using transformer..
    Any one can help me
    This is my Xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <place>
    <name>chennai</name>
    </place>
    Jsp Page
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ page import="javax.xml.parsers.DocumentBuilderFactory,
    javax.xml.parsers.DocumentBuilder,org.w3c.dom.*,org.w3c.dom.Element"
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <% String str="";
    String str1="";
    try
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse("http://localhost:8084/XmlApplication1/sss.xml");
    out.println("Before change");
    NodeList n11 = doc.getElementsByTagName("name");
    Node n22= n11.item(0).getFirstChild();
    str1 = n22.getNodeValue();
    out.println(str1);
    out.println("After change");
    String name = "Banglore";
    NodeList nlst = doc.getElementsByTagName("name");
    Node node= nlst.item(0).getFirstChild();
    node.setNodeValue(name);
    NodeList n1 = doc.getElementsByTagName("name");
    Node n2= n1.item(0).getFirstChild();
    str = n2.getNodeValue();
    out.println(str);
    catch(Exception e)
    out.println(e) ;
    %>
    <h1><%=str%></h1>
    <%--
    This example uses JSTL, uncomment the taglib directive above.
    To test, display the page like this: index.jsp?sayHello=true&name=Murphy
    --%>
    <%--
    <c:if test="${param.sayHello}">
    <!-- Let's welcome the user ${param.name} -->
    Hello ${param.name}!
    </c:if>
    --%>
    </body>
    </html>

    hi check this exit...
    IWO10012

  • HT201210 I tried to update my ipad through wifi and followed the steps. It says that update is complete however i must connect to itunes and restore the updates but itines says i dont have permission to do so. KIndly assist on the stages to follow. Screen

    I tried to update my ipad through wifi and followed the steps. It says that update is complete however i must connect to itunes and restore the updates but itines says i dont have permission to do so. KIndly assist on the stages to follow. Screen is black ad i unable to work on it.
    Kindly give some suggestions
    Regards
    Banzi

    Hello Mayanii,
    This display and behavior indicates that the iPad is in recovery mode and must be restored.
    If you can't update or restore your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT1808
    Cheers,
    Allen

  • Looping through XML tree

    Hi All,
    I need help in retrieving the values of nodes in a XML tree
    If I have a xml document like
    <form>
    <item>
    <form_seq_no>1</form_inst_seq_no>
    <patientid>21</patientid>
    <facilityid>23</facilityid>
    </item>
    <item>
    <form_seq_no>2</form_inst_seq_no>
    <patientid>212</patientid>
    <facilityid>233</facilityid>
    </item>
    <item>
    <form_seq_no>3</form_inst_seq_no>
    <patientid>213</patientid>
    <facilityid>234</facilityid>
    </item>
    How can I get the values of form_Seq_no node?
    I want to loop for all the nodes so that I can update a table for every form_seq_no....
    Thanks....

    Why did you open a new thread where the problem seems to be exactly the same as the one from your Re: Looping through XML Items?
    In particular what is wrong with the solution given Re: Looping through XML Items?

  • Replaceregexp tag in build.xml to pass the value dynamically

    Hi,
    First of all I apologizes as this is not a java question, but sure you guys can help me out. In my build.xml, i have some thing like this:-
    <target name="all"
    depends="compile,clean_classes,replaceTemplates"/>
    <target name="compile"
    depends=" create.dir,compileclasses,jar,run"/>
         <target name="clean">
         <delete dir="${build.dir}"/>
         </target>
    <target name="clean_classes">
    <delete dir="${classes.dir}"/>
    </target>
    <target name="create.dir" depends="clean_classes">
    <mkdir dir="${classes.dir}"/>
    </target>
         <target name="replaceTemplates" depends="clean_classes">
              <replaceregexp file="${sourcefiles}/com/test/BusinessService.java"
                                  match="%%VALUE%%"
    replace="1"/> // this will be fetched dynamically from .properties
    </target>
    In my BusinessService.java,
    I have a String strValue = "%%VALUE%%";
    When i ran the build.xml, the strValue is not replaced with the value "1" as been specified in the build.xml. It seems that everything is fine the class file name path, etc. But some how it is not displaying the value "1" inplace of the placeholder? Please clarify.
    One more question on this:-
    If the value "1" is displayed for strValue variable, and if i have updated the value in the build.xml replace="2" for <replaceregexp>, in such case the updated value "2" wont be populated. Hence what is the approach we need follow, whether we need to create another folder and copy the "src" code there and make the changes in it like instead of:-
    <target name="replaceTemplates" depends="clean_classes">
              <replaceregexp file="${sourcefiles}/com/test/BusinessService.java"
                                  match="%%VALUE%%"
    replace="1"/> // this will be fetched dynamically from .properties
    </target>
    the new one will be like:-
    <target name="replaceTemplates" depends="clean_classes">
              <replaceregexp file="*${build}/*src/com/test/BusinessService.java"
                                  match="%%VALUE%%"
    replace="1"/> // this will be fetched dynamically from .properties
    </target>
    Please clarify.
    Thanks

    Don't be so impatient and don't multipost! I've deleted your other thread about the same topic.

  • How can i calculate the percentages and update the progressBar in the splash screen form ?

    I created a splash screen form:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.IO;
    using System.Threading;
    namespace GetHardwareInfo
    public partial class SplashScreen : Form
    public SplashScreen()
    InitializeComponent();
    private Mutex mutex = new Mutex();
    public void SyncedClose()
    mutex.WaitOne();
    this.Close();
    mutex.ReleaseMutex();
    public void UpdateProgressBar(int percentage)
    if (this.InvokeRequired)
    mutex.WaitOne();
    if (!IsDisposed)
    this.BeginInvoke(new Action<int>(UpdateProgresPRV), percentage);
    mutex.ReleaseMutex();
    else
    UpdateProgresPRV(percentage);
    private void UpdateProgresPRV(int per)
    if (progressBar1.IsDisposed) return;
    progressBar1.Value = per;
    private void SplashScreen_Load(object sender, EventArgs e)
    The SplashScreen form have in the designer image and on the image a progressBar1.
    Then in form1 i did in the top:
    List<string> WmiClassesKeys = new List<string>();
    IEnumerable<Control> controls;
    string comboBoxesNames;
    SplashScreen splash = new SplashScreen();
    And in the constructor:
    controls = LoopOverControls.GetAll(this, typeof(ComboBox));
    string[] lines = File.ReadAllLines(@"c:\wmiclasses\wmiclasses1.txt");
    foreach (string line in lines)
    foreach (ComboBox comboBox in controls.OfType<ComboBox>())
    if (line.StartsWith("ComboBox"))
    comboBoxesNames = line.Substring(14);
    else
    if (line.StartsWith("Classes"))
    if (comboBox.Name == comboBoxesNames)
    comboBox.Items.Add(line.Substring(14));
    foreach (ComboBox comboBox in controls.OfType<ComboBox>())
    comboBox.SelectedIndex = 0;
    The method GetAll is to loop over specific controls:
    public static IEnumerable<Control> GetAll(Control control, Type type)
    var controls = control.Controls.Cast<Control>();
    return controls.SelectMany(ctrl => GetAll(ctrl, type))
    .Concat(controls)
    .Where(c => c.GetType() == type);
    When i'm running the program it's taking some time to make the foreach loops in this time i need to show the SplashScreen and update the progressBar untill the foreach loops over.

    Don't use Application.Doevents. It's not required and can cause problems.
    I do not really grasp the approach you are taking here. So let me make a different suggestion:
    SplashScreen:
    using System;
    using System.Windows.Forms;
    using System.Threading;
    namespace WindowsFormsApplication1
    public partial class SplashScreen : Form
    private static SplashScreen DefaultInstance;
    public SplashScreen()
    InitializeComponent();
    public static void ShowDefaultInstance()
    Thread t = new Thread(TMain);
    t.Name = "SplashUI";
    t.Start();
    public static void CloseDefaultInstance()
    DefaultInstance.Invoke(new Action(DefaultInstance.Close));
    private static void TMain()
    DefaultInstance = new SplashScreen();
    DefaultInstance.Show();
    Application.Run(DefaultInstance);
    public static void UpdateProgress(int Progress)
    if (DefaultInstance.InvokeRequired)
    DefaultInstance.Invoke(new Action<int>(UpdateProgress), Progress);
    else
    DefaultInstance.progressBar1.Value = Progress;
    Form1:
    using System.Windows.Forms;
    namespace WindowsFormsApplication1
    public partial class Form1 : Form
    public Form1()
    InitializeComponent();
    SplashScreen.ShowDefaultInstance();
    for (int i = 1; i<=100; i++)
    System.Threading.Thread.Sleep(20); // simulates work
    SplashScreen.UpdateProgress(i);
    SplashScreen.CloseDefaultInstance();
    EDIT: Please note that the progressbar itself is being animated by the system, so it might look slower than it really is. To workaround this, there are solutions available (you'll find them) that first set the value one higher than necessary, then
    back to the actual value.
    Edit #2: You do need a different thread, otherwise the UI is locked while the loop is running in your Form1's constructor.
    Armin

  • Api to update the values in per_periods_of_placement table

    Hi,
    can anyone let me know whether any hrms api is available to update the values in the table PER_PERIODS_OF_PLACEMENT.
    I want to update the values under the column TERMINATION_REASON in per_periods_of_placement for few set of contingent workers(for those a wrong reason was entered need to replace with correct value now).
    Please revert asap.
    Thanks,
    Jithendra

    Here is my stand alone PL/SQL block :
    I am supplying the start_date fro mthe per_periods_of_ placement table itself...
    DECLARE
    CURSOR get_cwk_details IS
    SELECT person_id cwk_person_id,
    object_version_number ovn,
    date_start service_start_date
    FROM per_periods_of_placement pdp, hr_lookups l
    WHERE l.lookup_type(+) = 'HR_CWK_TERMINATION_REASONS'
    AND l.lookup_code(+) = pdp.termination_reason
    AND HR_GENERAL.DECODE_LOOKUP ('HR_CWK_TERMINATION_REASONS',
    PDP.TERMINATION_REASON) = 'Deceased' ;
    l_person_id NUMBER(20);
    l_ovn NUMBER(10);
    l_date_start DATE;
    BEGIN
    FOR get_cwk_details_rec in get_cwk_details
    LOOP
    l_person_id := 153564;--get_cwk_details_rec.cwk_person_id;
    l_ovn := get_cwk_details_rec.ovn;
    l_date_start := get_cwk_details_rec.service_start_date;
    dbms_output.put_line('l_person_id = ' || l_person_id);
    dbms_output.put_line('l_ovn = ' || l_ovn);
    dbms_output.put_line(' l_date_start = ' || l_date_start);
    apps. hr_periods_of_placement_api.update_pdp_details(
    P_VALIDATE => FALSE,
    P_EFFECTIVE_DATE => l_date_start,
    P_OBJECT_VERSION_NUMBER => l_ovn,
    P_PERSON_ID => l_person_id,
    P_DATE_START => l_date_start,
    P_TERMINATION_REASON => 'DW');
    COMMIT;
    END LOOP;
    END;

  • Function module for updating the values in table VTTK

    Hi,
    I am working on a report in which I need to update the value of field tdlnr of table vttk for a particular shipment number. I need to do this using functional module and I am not been able to find one. If anyone knows answer to this plz help.
    Thanks in advance,
    Priyanka.

    As noted above, RETURN table must be supplied empty, it is for BAPI to return the messages back to the calling program. You simply need to define an internal table, pass it to BAPI as is and then analyze this table after the BAPI call. For example:
    DATA: BEGIN OF it_return OCCURS 0.
            INCLUDE STRUCTURE bapiret2.
    DATA: END OF it_return.
    CALL FUNCTION 'BAPI_SHIPMENT_CHANGE'
    <...>
      TABLES
    <...>
        return = it_return.
    LOOP AT it_return.
      MESSAGE
           ID      it_return-id
           TYPE    it_return-type
           NUMBER  it_return-number
       WITH
                   it_return-message_v1
                   it_return-message_v2
                   it_return-message_v3
                   it_return-message_v4.
    ENDLOOP.
    Hope this helps.

  • Oracle Looping through XML nodes

    Hi,
    I have this XML which i m getting as response from a webservice. i need to loop through nodes and i m not sure how to go about it. i have done example using dbms_xmldom but i m literally stuck. this is the xml here i need to loop through
    statuslognotes for one enquiry, there may be multiple statuslognotes and need to insert into database....
    i also need to check for multiple updatedenquiry and if thats got statuslognotes....i hope you get me.
    <ProcessOperationsResult xmlns="http://www.abc.co.uk/schema/am/connector/webservice" >
    <Response SchemaVersion="1.4" xmlns="" >
    <OperationResponse>
    <GetEnquiryStatusChangesResponse>
    <UpdatedEnquiry>
    <EnquiryNumber>104</EnquiryNumber>
    <ExternalSystemNumber>1</ExternalSystemNumber>
    <ExternalSystemReference>195</ExternalSystemReference>
    <EnquiryStatusLog>
    <EnquiryStatusCode>1224</EnquiryStatusCode>
    <EnquiryStatusName>Cancelled By User</EnquiryStatusName>
    <AssignedOfficerCode>BBB</AssignedOfficerCode>
    <AssignedOfficerName>Testing</AssignedOfficerName>
    <LoggedTime>2007-12-11T14:44:53</LoggedTime>
    <LogEffectiveTime>2007-12-11T14:44:52</LogEffectiveTime>
    <StatusFollowUpTime>2007-12-11T14:44:52</StatusFollowUpTime>
    <LoggedByUserName>System Supervisor</LoggedByUserName>
    <LoggedByUserId>AAA</LoggedByUserId>
    </EnquiryStatusLog>
    <EnquiryStatusLog>
    <EnquiryStatusCode>1225</EnquiryStatusCode>
    <EnquiryStatusName>Cancelled By User</EnquiryStatusName>
    <AssignedOfficerCode>DEF</AssignedOfficerCode>
    <AssignedOfficerName>Srinivas</AssignedOfficerName>
    <LoggedTime>2007-12-11T14:44:53</LoggedTime>
    <LogEffectiveTime>2007-12-11T14:44:52</LogEffectiveTime>
    <StatusFollowUpTime>2007-12-11T14:44:52</StatusFollowUpTime>
    <LoggedByUserName>System Supervisor</LoggedByUserName>
    <LoggedByUserId>AAA</LoggedByUserId>
    </EnquiryStatusLog>
    </UpdatedEnquiry>
    <UpdatedEnquiry>
    <EnquiryNumber>105</EnquiryNumber>
    <ExternalSystemNumber>1</ExternalSystemNumber>
    <ExternalSystemReference>196</ExternalSystemReference>
    <EnquiryStatusLog>
    <EnquiryStatusCode>1226</EnquiryStatusCode>
    <EnquiryStatusName>Cancelled By User</EnquiryStatusName>
    <AssignedOfficerCode>Test</AssignedOfficerCode>
    <AssignedOfficerName>SS</AssignedOfficerName>
    <LoggedTime>2007-12-11T14:44:53</LoggedTime>
    <LogEffectiveTime>2007-12-11T14:44:52</LogEffectiveTime>
    <StatusFollowUpTime>2007-12-11T14:44:52</StatusFollowUpTime>
    <LoggedByUserName>System Supervisor</LoggedByUserName>
    <LoggedByUserId>BS</LoggedByUserId>
    </EnquiryStatusLog>
    </UpdatedEnquiry>
    </GetEnquiryStatusChangesResponse>
    </OperationResponse>
    </Response>
    </ProcessOperationsResult>
    Any help appreciated....as i m new to this XPATH stuff in oracle.
    Cheers
    S

    hi,
    i have written this stored procedure, but i m sure this is not perfect. i want someone to help me out with this.
    CREATE OR REPLACE procedure ParseXML as
    l_xml XMLTYPE;
    l_value VARCHAR2(10);
    SCHEMALIST_DOM DBMS_XMLDOM.DOMDOCUMENT;
    SCHEMA_NODELIST DBMS_XMLDOM.DOMNODELIST;
    SCHEMA_NODELIST_SUB DBMS_XMLDOM.DOMNODELIST;
    SCHEMA_NODE DBMS_XMLDOM.DOMNODE;
    SCHEMA_sub_XPATH VARCHAR2(256);
    SCHEMA_XPATH VARCHAR2(256);
    CHILD_XPATH VARCHAR2(256);
    SOURCE_PATH VARCHAR2(256);
    XPATH_INDEX number(2);
    XPATH_sub_INDEX number(2);
    NODE_VALUE VARCHAR2(256);
    Statcode VARCHAR2(256);
    Statname VARCHAR2(256);
    Officer VARCHAR2(256);
    BEGIN
    l_xml := XMLTYPE.createXML('<ProcessOperationsResult xmlns="http://www.abc.co.uk/schema/am/connector/webservice">
    <Response SchemaVersion="1.4" xmlns="">
    <OperationResponse>
    <GetEnquiryStatusChangesResponse>
    <UpdatedEnquiry>
    <EnquiryNumber>104</EnquiryNumber>
    <ExternalSystemNumber>1</ExternalSystemNumber>
    <ExternalSystemReference>195</ExternalSystemReference>
    <EnquiryStatusLog>
    <EnquiryStatusCode>1224</EnquiryStatusCode>
    <EnquiryStatusName>Cancelled By User</EnquiryStatusName>
    <AssignedOfficerCode>TEST</AssignedOfficerCode>
    <AssignedOfficerName>test</AssignedOfficerName>
    <LoggedTime>2007-12-11T14:44:53</LoggedTime>
    <LogEffectiveTime>2007-12-11T14:44:52</LogEffectiveTime>
    <StatusFollowUpTime>2007-12-11T14:44:52</StatusFollowUpTime>
    <LoggedByUserName>System Supervisor</LoggedByUserName>
    <LoggedByUserId>BS</LoggedByUserId>
    </EnquiryStatusLog>
    <EnquiryStatusLog>
    <EnquiryStatusCode>1225</EnquiryStatusCode>
    <EnquiryStatusName>Cancelled By User</EnquiryStatusName>
    <AssignedOfficerCode>DEF</AssignedOfficerCode>
    <AssignedOfficerName>SSi</AssignedOfficerName>
    <LoggedTime>2007-12-11T14:44:53</LoggedTime>
    <LogEffectiveTime>2007-12-11T14:44:52</LogEffectiveTime>
    <StatusFollowUpTime>2007-12-11T14:44:52</StatusFollowUpTime>
    <LoggedByUserName>System Supervisor</LoggedByUserName>
    <LoggedByUserId>SBS</LoggedByUserId>
    </EnquiryStatusLog>
    </UpdatedEnquiry>
    <UpdatedEnquiry>
    <EnquiryNumber>105</EnquiryNumber>
    <ExternalSystemNumber>1</ExternalSystemNumber>
    <ExternalSystemReference>196</ExternalSystemReference>
    <EnquiryStatusLog>
    <EnquiryStatusCode>1226</EnquiryStatusCode>
    <EnquiryStatusName>Cancelled By User</EnquiryStatusName>
    <AssignedOfficerCode>TEST</AssignedOfficerCode>
    <AssignedOfficerName>test</AssignedOfficerName>
    <LoggedTime>2007-12-11T14:44:53</LoggedTime>
    <LogEffectiveTime>2007-12-11T14:44:52</LogEffectiveTime>
    <StatusFollowUpTime>2007-12-11T14:44:52</StatusFollowUpTime>
    <LoggedByUserName>System Supervisor</LoggedByUserName>
    <LoggedByUserId>SBS</LoggedByUserId>
    </EnquiryStatusLog>
    </UpdatedEnquiry>
    </GetEnquiryStatusChangesResponse>
    </OperationResponse>
    </Response>
    </ProcessOperationsResult>');
    SCHEMALIST_DOM := DBMS_XMLDOM.newDOMDocument(L_XML);
    SCHEMA_NODELIST := DBMS_XMLDOM.GETELEMENTSBYTAGNAME(SCHEMALIST_DOM,'GetEnquiryStatusChangesResponse');
    SCHEMA_NODELIST_SUB := DBMS_XMLDOM.GETELEMENTSBYTAGNAME(SCHEMALIST_DOM,'/UpdatedEnquiry/EnquiryStatusLog');
    FOR i in 0 .. (DBMS_XMLDOM.GETLENGTH(SCHEMA_NODELIST) - 1) LOOP
    XPATH_INDEX := i+1;
    FOR j in 0 .. (DBMS_XMLDOM.GETLENGTH(SCHEMA_NODELIST_SUB) - 1) LOOP
    XPATH_SUB_INDEX := J+1;
    SCHEMA_SUB_XPATH := '/GetEnquiryStatusChangesResponse/UpdatedEnquiry[' || XPATH_INDEX || ']/EnquiryStatusLog[' || XPATH_sub_INDEX || ']/';
    --dbms_output.put_line(SCHEMA_SUB_XPATH);
    CHILD_XPATH := SCHEMA_SUB_XPATH || 'EnquiryStatusCode/text()';
    dbms_output.put_line('child path text ' || child_XPATH);
    DBMS_XSLPROCESSOR.VALUEOF(DBMS_XMLDOM.MAKENODE(SCHEMALIST_DOM),CHILD_XPATH, Statcode);
    CHILD_XPATH := SCHEMA_SUB_XPATH || 'EnquiryStatusName/text()';
    DBMS_XSLPROCESSOR.VALUEOF(DBMS_XMLDOM.MAKENODE(SCHEMALIST_DOM),CHILD_XPATH, Statname);
    CHILD_XPATH := SCHEMA_SUB_XPATH || 'AssignedOfficerCode/text()';
    DBMS_XSLPROCESSOR.VALUEOF(DBMS_XMLDOM.MAKENODE(SCHEMALIST_DOM),CHILD_XPATH, Officer);
    dbms_output.put_line('EnquiryStatusCode => "' || Statcode || '",');
    dbms_output.put_line('EnquiryStatusname => "' || Statname || '",');
    dbms_output.put_line('AssignedOfficerCode => "' || Officer || '",');
    end loop;
    --GetEnquiryStatusChangesResponse/UpdatedEnquiry[2]
    schema_xpath := '/GetEnquiryStatusChangesResponse/UpdatedEnquiry[' || XPATH_INDEX || ']/EnquiryStatusLog['|| XPATH_INDEX || ']/' ;
    CHILD_XPATH := SCHEMA_XPATH || 'EnquiryStatusCode/text()';
    dbms_output.put_line('another node text ' || child_XPATH);
    DBMS_XSLPROCESSOR.VALUEOF(DBMS_XMLDOM.MAKENODE(SCHEMALIST_DOM),CHILD_XPATH, Statcode);
    end loop;
    end;
    Basically i may just get one UpdatedEnquiry record with multiple EnquiryStatusLog (changes),
    I need to get the EnquiryStatusLog nodes and create a insert stmt with the Enquiry Number.
    and if theres multiple <UpdatedEnquiry> nodes, i need the same thing done.
    Hope i make sense here.....
    Can someone help
    Cheers
    S

  • My new 8th gen iPod nano is 'not recognized' by my computer. My computer runs on Windows 7, and I've installed and updated the latest versions of itunes etc, but still to no avail! I've tried different usb ports, troubleshooting...

    My computer runs on Windows 7, and I've installed and updated the latest versions of itunes etc, but still to no avail! I've tried different usb ports, troubleshooting, etc... But it still says "One of the USB decuces arrached to this omputer has malfunctioned and windows does not recognize it".
    The iPod is brand new, sent to me by Apple as part of the 1st gen replacement programme. I've been using the cable that came with the 1st gen iPod (I bought the first gen second hand) It always worked on my computer with the 1st gen iPod. So I was wondering, do you think I need to replace my cable in order for my PC to recognize my iPod or is it something else?
    Thanks

    Try a different cable. And are you connecting directly to your computer or through a USB hub?

Maybe you are looking for

  • I have recently bought a LaCie Hard Drive,

    I have recently bought a LaCie Hard Drive, it works fine, and I have formatted for use with Mac OS X. I share my iMac with other users, 3 others to be exact, and I want them to be able to use the external hard drive to store their files, music etc. H

  • Problem in creating user defined fields

    hi,    i created nearly 25 userdefined fields. after that b1 is not allowing me to created further, I like to know any restriction is there to create or kindly give me the solution to create. Regards R.vijai

  • Exception in Integration Process?

    Hi, How can I create an exception in the integration process? Thanks for yiur help. Regards. Stefan

  • NIC issue

    Hi, I am trying to configure 2 ports from a 4 port Ethernet GigaSwift card to connect to different networks. The NIC's first port bge0 works fine and it holds the main ip of my server. i.e bge0: ip: 1.2.3.4 netmask:255.255.255.240 The second port bge

  • Lost calendars, colours and publishes after upgrade to Leopard.

    I've just upgraded my ibook g4 from 10.3.9 to 10.5.4 It appeared to go smoothly, though thankfully I had used backup to store most of the important stuff on an external firelite drive. I opened iCal and am still horrified. 1) about half of my calenda