How to update XML Facts in rule author

Hi,
since there is not a separate forum for the rules engine and this is tightly related to BPEL, so I thought I'd post the question here.
what's the process to update XML Facts in the rule author and the BPEL process that is already using the rule repository for decisions?
for example, if I change the data type on one of the elements in the XML Facts schema from string to int, what do I do next to put such change into the existing rule repository and update the BPEL side of things?
I have tried re-importing the updated XSD into the rule repository (it's a WebDAV repository), I can see the change in the new definitions for the xsd, and I can also make use of the change to define new rules, in the words, the rule author side seems fine;
then I copied the updated xsd into my BPEL project that calls the rules engine, and then what should I do next? I can't see any where in jDeveloper I can "update" the decision service partner link, so I just re-deployed the BPEL process with the updated xsd under the rule/xsd folder, but then the same call to the decision service starts failing with a "business exception, cx-fault-actor" but without any more details.
I haven't added any new rules, only change of data type on one element.
what am I missing?
thanks.

In ALDSP 2.5 (and ALDSP 3.0), non-XA data sources can be updated without writing an update-override. But if you want to do any special processing that is not handled by the default behaviour, or for data services not based on relational databases, in ALDSP 2.5, you can write an update-override.
In ALDSP 3.0, the update model is somewhat different, I suggest that you peruse the ALDSP 3.0 documentation for a thorough discussion. The documentation is here http://edocs.bea.com/aldsp/docs30/index.html I suggest start with a search on 'update'.
In ALDSP 3.0, I believe updateoverride feature still exists for the purpose of backwards compatibility (at least it turned up in a search of updateoverride in the 3.0 docs)

Similar Messages

  • HOw to update XML file residing in DAM by component JSP in run-time?

    i have made a component which reads xml file residing in DAM.
    Content Author can fill some values in dialog of this component, as soon as author provide the values,i have to update these values in XML file and component reloadsby reading the updated xml file.
    i am trying to achieve this by making object of XML file and giving it's path., but i ma unable to access the XML file.
    Can anyone help me out to how to update XML file by component JSP in run-time?

    Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT?
    XSLT approach:  check these online tutorial
    http://www.xml.com/pub/a/2000/08/02/xslt/index.html
    http://www.xml.com/pub/a/2000/06/07/transforming/index.html
    ABAP approach:
    for example you have the xml (original) in a string called say xml_out .
    data: l_xml  type ref to cl_xml_document ,
            node type ref to if_ixml_node  .
    create object l_xml.
    call method l_xml->parse_string
      exporting
        stream = xml_out.
    node = l_xml->find_node(
        name   = 'IDENTITY'
       ROOT   = ROOT
    l_xml->set_attribute(
        name    = 'Name'
        value   = 'Charles'
        node    = node
    (the above example reads the element IDENTITY and sets attribute name/value to the same)
    like wise you can add new elements starting from IDENTITY using various methods available in class CL_XML_DOCUMENT
    so how do I access the XML file in order to update it?
    you have already read this XML into a ABAP variable right?
    Sorry couldnt understand your whole process, why do you need to read local XML file?
    Raja

  • How to update XML file through UCCX script ?

    Hi,
    I have an UCCX script with MENU step. One of the step is for technical support team. When caller chose this step, information about date and time of the call and calling number should be recorded on a XML file located on the web server.
    This XML is uploaded into the web server , but I don't know how to update it through UCCX script.
    Here is how the XML file looks like:
    <?xml version="1.0" ?>
    <rss version="2.0">
    <channel>
    <title>CALL LOG</title>
    <link></link>
    <description>Support Call log</description>
    <ttl>1</ttl>
    <item>
    <title>2011-08-24 14:56:39 - 00044 123 123 123</title>
    <link></link>
    <description></description>
    </item
    </channel>
    </rss>
    Any idea?
    Thanks,
    O

    Hi
    The 'keyword transform' step uses the template XML file to generate the actual XML file you want to post... the template would be a plain text file uploaded to the repository, and would look like so:
    <?xml version="1.0" ?>
    CALL LOG
    Support Call log
    1
    %%calldatetime%% - %%clinumber%%
    Now - if you had that bit of XML, with correct time/number in it - have you verified know that you can definately just post that XML to a certain URL to get it on the server? Check with whoever manages that server exactly what you need to do to get it to appear - then worry about how you do that from UCCX. It may not be a matter of posting up that XML, you may need it in a different format or something..
    Aaron

  • How to update a fact table when a dimension table is reloaded

    We have implemented BI Apps 796. Insertion into W_EMPLOYEE_D table which stores all the employee information had stopped one year back as some company security policy restricted the informatica worklfows to pick up the data. (PER_ALL_PEOPLE_F was a HRMS table and it contained sensitive information line SSN and salary, was inaccessible to the user which informatica uses and the SDE mapping used to return 0 rows).
    Now we have the approval to see those rows and the dimension table is loaded with some 100 new employees who joined in last one year.
    The ROW_WID of W_EMPLOYEE_D is referenced in lot of fact tables and for all those missing employees the WID in the fact table is 0.
    Now that we have all employees, how to make the FACT table point to the correct WID and not store 0. Has anyone faced this problem before?? Writing an update statement will be a tedious task as there are so many fact tables that join to w_employee_d. Also our company uses Sales, Procurement, Finance modules of OB Apps (which constitutes atleast 20 fact tables)
    Any guidance is appreciated. Thanks in advance

    Hello Kostis,
    thank you for your answer. I don't fully understand you. Can you show me short example, please? I create alias table for time dimension on Physical Layer - original table is TimeDayDim and I create aliases TimeDayDim1, TimeDayDim2, TimeDayDim3, TimeDayDim4. Then I create foreign key Fact.Time1 -> TimeDayDim1, Fact.Time2 -> TimeDayDim2, Fact.Time3 -> TimeDayDim3, Fact.Time4 -> TimeDayDim4. And what now? Must I create these table api Bussines Model and create new time dimensions at bussiness model????
    I need in Answers ONE Time dimension. I think I must split my fact table to four tables ... (time1, place1 ...) (time2, place2 ...) (time3 place3...) (time4 place4...) then link those tables to Time dimension (but I dont know where I can split those tables - on Physical Layer or on Bussines Layer).
    I suppose that I will have in Answers one time dimension and four facts tables and I will be able to query them. (for example: Time.Days, Fact1.Place1, Fact3.Speed, Fact4.Count Criteria: Time.Year = 2008)
    Best Regards Vlada

  • How to update xml nodes?

    Hi friends,
                 i have a xml with 100 contacts , every contact has child nodes.....i want to update a perticular contact based on the id , how to update or a replace a new contact with matched contact based on contact id ,please help me out......
    thanks
    -Balu

    Hi
    The 'keyword transform' step uses the template XML file to generate the actual XML file you want to post... the template would be a plain text file uploaded to the repository, and would look like so:
    <?xml version="1.0" ?>
    CALL LOG
    Support Call log
    1
    %%calldatetime%% - %%clinumber%%
    Now - if you had that bit of XML, with correct time/number in it - have you verified know that you can definately just post that XML to a certain URL to get it on the server? Check with whoever manages that server exactly what you need to do to get it to appear - then worry about how you do that from UCCX. It may not be a matter of posting up that XML, you may need it in a different format or something..
    Aaron

  • How can I create connection from rule author using WebDAV

    Dear Experts,
    I am implementing Rule-Based application. While creating Rule author I am facing a problem. Under Repository tab I can find two options, 1. WebDAV 2. FileBased. I want to know what I have to specify in the URL part when I choose Repository type as "WebDAV". Or else I need to install WebDAV in my local machine. Please suggest me.
    What is the WebDAV url to create rule author connection.
    Thanks,
    Rajesh

    Hi Rajesh,
    You would be following : steps of enabling the WebDAV directory which is specified in
    http://download-east.oracle.com/docs/cd/B25221_03/web.1013/b15986/webdav.htm#CHDFHJGB
    Then created a directory called test_repository under ~Apache/htdocs folder : http://hostname:httpport/test_repository/
    Updated the moddav.conf file with below specified entry and restarted the HTTP server
    <Location /test_repository>
    DAV on
    ForceType text/plain
    </Location>
    Then, from the ruleauthor you should be able to connect to the WebDAV directory http://hostname:httpport/test_repository/
    Also, make sure that the Apache process can write to that WebDAV directory.
    Check the Apache's error_log to see what went wrong.
    Cheers
    Anirudh Pucha

  • How to update XML file from the program

    i am new in abap , and i have the following issue,so plz anyone who knows how to do it
    Background :
    An XML file is used as the datasource for a Flex Application. From time to time this requires updating with new staff details.
    i have already saved the xml file in the c drive with the name C:\AdvAC\AC1\bin-debug\assets\staff
    Requirement :  Write a Dialog transaction with the following text input fields.
    Reference Indicator.     (Char10)
    Staff No          (NUMC, Length 5)
    Name               (Char50)
    Room               (Numc, length 3)
    Phone               (Numc Length 7)
    Mail               (char30)
    in screen 100
    The transaction should also have an u201CUpdate Fileu201D button, which when pressed :
    1) Loads the file C:\AdvAC\AC1\bin-debug\assets \ into an ITAB.
    2) Inserts the data into the ITAB using the following XML format.
    <staff>
    <ref_ind> Reference Indicator.</ref_ind>
    <staff_no> Staff No </staff_no>
    <name> Name </name>
    <room> Room </room>
    <phone> Phone </phone>
    <mail> Mail </mail>
    </staff>
    all should be inside  <allstaff> </allstaff> tagsu2026.
    Writes the ITAB back to the file.
    thanx all

    this is what i have done but i dont know how to do the rest. i will apprecite any help from u.
    Edited by: man700s on Feb 16, 2010 6:58 AM
    REPORT  Z_XML_FILE_UPDATE.
    TYPES: BEGIN OF ts_staff,
             REF_IND(10)  TYPE c,
             Staff_No(5)  TYPE c,
             Name(50)     TYPE c,
             Room(3)      Type n,
             Phone(7)     Type n,
             Mail(30)     Type c,
           END OF ts_staff.
    DATA: t_staff TYPE TABLE OF ts_staff WITH HEADER LINE.
    DATA: w_staff Type ts_staff.
    DATA T_STRING TYPE TABLE OF STRING.
    DATA W_STRING TYPE STRING.
    call SCREEN 100.
    PERFORM upload_xml_file.
    PERFORM update_xml_tab.
    *PERFORM download_xml_file.
    MODULE USER_COMMAND_0100 INPUT.
    W_STRING = '<allstaff>'.
      APPEND w_string to t_string.
      loop at t_staff into w_staff.
      w_string ='<staff>'.
      APPEND w_string to t_string.
      if T_staff-Ref_Ind = 'X'.
      CONCATENATE '<Ref_Ind>' w_staff-Ref_Ind '</Ref_Ind>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-staff_no = 'X'.
      CONCATENATE '<staff_no>' w_staff-staff_no '</staff_no>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-name = 'X'.
      CONCATENATE '<name>' w_staff-name '</name>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
    if T_staff-room = 'X'.
      CONCATENATE '<room>' w_staff-room '</room>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-phone = 'X'.
      CONCATENATE '<phone>' w_staff-phone '</phone>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-mail = 'X'.
      CONCATENATE '<mail>' w_staff-mail '</mail>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      w_string = '</staff>'.
      append w_string to t_string.
    ENDLOOP.
      W_STRING = '</allstaff>'.
      APPEND w_string to t_string.
    ENDMODULE.               
    Edited by: man700s on Feb 16, 2010 7:01 AM

  • How to update XML file using XSLT

    Hi there,
    I have a "small" issue with exporting data to an XML file using XSLT.
    A two steps process is needed to import data from a non-hierarchical XML file into ABAP, change the data, and then update the XML file with new values. The problem is not trivial, since the format of the XML file is a complex one: there are many interdependent elements on the same level, pointing to each other by using id and ref attributes. Based on these values the data can be read and written into an internal table. I use XSLT and XPath for that. So the inbound process is done and seems to work correctly. I have to mention that the file contains much more data than I need. I am working only with a small part of it.
    Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT? I can pass only the internal table to the transformation, so how do I access the XML file in order to update it? I have tried to use the <B>xsl:document()</B> function to access the content of the file store locally on my PC, but it fails each time by throwing and URI exception. I have tried the absolute path without any addition and the path with the file:/// addition. Same result. Please advise.
    Many thanks,
    Ferenc
    P.S. Please provide me with links only if they are relevant for this very matter. I will not give points for irrelevant postings...

    Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT?
    XSLT approach:  check these online tutorial
    http://www.xml.com/pub/a/2000/08/02/xslt/index.html
    http://www.xml.com/pub/a/2000/06/07/transforming/index.html
    ABAP approach:
    for example you have the xml (original) in a string called say xml_out .
    data: l_xml  type ref to cl_xml_document ,
            node type ref to if_ixml_node  .
    create object l_xml.
    call method l_xml->parse_string
      exporting
        stream = xml_out.
    node = l_xml->find_node(
        name   = 'IDENTITY'
       ROOT   = ROOT
    l_xml->set_attribute(
        name    = 'Name'
        value   = 'Charles'
        node    = node
    (the above example reads the element IDENTITY and sets attribute name/value to the same)
    like wise you can add new elements starting from IDENTITY using various methods available in class CL_XML_DOCUMENT
    so how do I access the XML file in order to update it?
    you have already read this XML into a ABAP variable right?
    Sorry couldnt understand your whole process, why do you need to read local XML file?
    Raja

  • How to update xml content based on resource_view path?

    I am using resource db to store xml documents. I can ftp xml documents into a specific path within resource db. I have a xml schema registered and setup with a xml table. I would like to update a xml document based on a specific resource_view path.
    For example:
    /some/path/mydocument.xml
    I would like to upddate this document using the path "/some/path/mydocument.xml"
    How can this be done using SQL?

    Typically the best way is if you know the name of the default table that contains your document. You do the update on the default table as follows
    update yourTable  t
         set object_value = updateXML(...)
    where ref(t) = (
                     select extractValue(res,'/Resource/XMLRef')
                       from resource_view
                      where equals_path(res,'/some/path/mydocument.xml') = 1
                          )

  • How to update XML source in ALDSP 3.0?

    1. ALDSP 2.5 provides a updateovrride class at server side for programmer to write custom update logic for Non-XA data source.
    how does ALDSP 3.0 do update with XML data source???
    2. I wrote a simple trigger service for ALDSP 2.5. It processes the datagraph, that is sent to the performUpdate() method of UpdateOverride class at server side, and analyses the update type and update location in the data object. According to this information, the trigger service loads some predefined triggers and performs the action part of these loaded triggers. All this happens at server side and in the performUpdate() methode.
    Now it seems that there is no UpdateOverride class in ALDSP 3.0, how can i call my trigger service at server side? :-(

    In ALDSP 2.5 (and ALDSP 3.0), non-XA data sources can be updated without writing an update-override. But if you want to do any special processing that is not handled by the default behaviour, or for data services not based on relational databases, in ALDSP 2.5, you can write an update-override.
    In ALDSP 3.0, the update model is somewhat different, I suggest that you peruse the ALDSP 3.0 documentation for a thorough discussion. The documentation is here http://edocs.bea.com/aldsp/docs30/index.html I suggest start with a search on 'update'.
    In ALDSP 3.0, I believe updateoverride feature still exists for the purpose of backwards compatibility (at least it turned up in a search of updateoverride in the 3.0 docs)

  • How to update xml from portal

    Can i update weblogic.xml from portal(programmatically). i am using WL
    platform 8.1 sp2.
    Now i am manually adding each principal name.
    For ex:
    <principal-name>mark</principal-name>
    Can i achieve this programmatically from portal.
    Any solution
    TIA
    Mahesh

    this is what i have done but i dont know how to do the rest. i will apprecite any help from u.
    Edited by: man700s on Feb 16, 2010 6:58 AM
    REPORT  Z_XML_FILE_UPDATE.
    TYPES: BEGIN OF ts_staff,
             REF_IND(10)  TYPE c,
             Staff_No(5)  TYPE c,
             Name(50)     TYPE c,
             Room(3)      Type n,
             Phone(7)     Type n,
             Mail(30)     Type c,
           END OF ts_staff.
    DATA: t_staff TYPE TABLE OF ts_staff WITH HEADER LINE.
    DATA: w_staff Type ts_staff.
    DATA T_STRING TYPE TABLE OF STRING.
    DATA W_STRING TYPE STRING.
    call SCREEN 100.
    PERFORM upload_xml_file.
    PERFORM update_xml_tab.
    *PERFORM download_xml_file.
    MODULE USER_COMMAND_0100 INPUT.
    W_STRING = '<allstaff>'.
      APPEND w_string to t_string.
      loop at t_staff into w_staff.
      w_string ='<staff>'.
      APPEND w_string to t_string.
      if T_staff-Ref_Ind = 'X'.
      CONCATENATE '<Ref_Ind>' w_staff-Ref_Ind '</Ref_Ind>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-staff_no = 'X'.
      CONCATENATE '<staff_no>' w_staff-staff_no '</staff_no>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-name = 'X'.
      CONCATENATE '<name>' w_staff-name '</name>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
    if T_staff-room = 'X'.
      CONCATENATE '<room>' w_staff-room '</room>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-phone = 'X'.
      CONCATENATE '<phone>' w_staff-phone '</phone>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-mail = 'X'.
      CONCATENATE '<mail>' w_staff-mail '</mail>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      w_string = '</staff>'.
      append w_string to t_string.
    ENDLOOP.
      W_STRING = '</allstaff>'.
      APPEND w_string to t_string.
    ENDMODULE.               
    Edited by: man700s on Feb 16, 2010 7:01 AM

  • How to update xml attributes as multiple rows

    I am new to this technology, but i need to show the result
    in xml document i have to update these attributes get from Databse utility class.
    <equipment object="" manufacturer="" part_number="" type="" model="" items="" accessories="">
    <equipment object="" manufacturer="" part_number="" type="" model="" items="" accessories="">By using XSLT Doucment i have to show this in table format multiple rows of data.
    I'll be happy if anyone tell me the example.

    Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT?
    XSLT approach:  check these online tutorial
    http://www.xml.com/pub/a/2000/08/02/xslt/index.html
    http://www.xml.com/pub/a/2000/06/07/transforming/index.html
    ABAP approach:
    for example you have the xml (original) in a string called say xml_out .
    data: l_xml  type ref to cl_xml_document ,
            node type ref to if_ixml_node  .
    create object l_xml.
    call method l_xml->parse_string
      exporting
        stream = xml_out.
    node = l_xml->find_node(
        name   = 'IDENTITY'
       ROOT   = ROOT
    l_xml->set_attribute(
        name    = 'Name'
        value   = 'Charles'
        node    = node
    (the above example reads the element IDENTITY and sets attribute name/value to the same)
    like wise you can add new elements starting from IDENTITY using various methods available in class CL_XML_DOCUMENT
    so how do I access the XML file in order to update it?
    you have already read this XML into a ABAP variable right?
    Sorry couldnt understand your whole process, why do you need to read local XML file?
    Raja

  • How to update xml file

    hai ....this is anitha.
    iam having some problem regarding the updation of the xml file. i can update the Node Values, its Attributes, its Childnodes etc.. successfully, but only once. first time it is working fine. but when again iam trying to update other nodes, the previously updated values r lost.. iam sending the code also.
    pls give the reply asp.
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.DOMException;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.FileInputStream;
    import javax.servlet.http.*;
    import java.util.ArrayList;
    import java.util.Iterator;
    //import javax.servlet.http.HttpSession;
    public class empXml
         String xmlFilePath="";
         File xmlFile=null;
         FileWriter fout=null;
         Element emp;
         Element empName;
         Element empDesig;
         Element empDiv;
         //Element newNode;
    public void createXml(ArrayList arr)throws IOException, DOMException
         try
              for(Iterator itr=arr.iterator();itr.hasNext();)
              System.out.println(itr.next());
              //System.out.println((String)(itr.next()));
              xmlFile=new File("D:\\Tomcat 4.0\\webapps\\news\\jsp\\employee.xml");
              System.out.println(" Employees Information ");
                        fout = new FileWriter(xmlFile);     
                        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                        DocumentBuilder docBuilder = dbf.newDocumentBuilder();
                        Document doc = docBuilder.getDOMImplementation().
                        createDocument("", "employee", null);
                        Element root = doc.getDocumentElement();
                        emp = doc.createElement("emp");
                        empName = doc.createElement("empname");
                             empName.appendChild(doc.createTextNode(arr.get(0).toString()));
                             emp.appendChild(empName);
                        empDesig = doc.createElement("empdesig");
                             empDesig.appendChild(doc.createTextNode(arr.get(1).toString()));
                             emp.appendChild(empDesig);
                        empDiv = doc.createElement("empdiv");
                             empDiv.appendChild(doc.createTextNode(arr.get(2).toString()));
                             emp.appendChild(empDiv);
                        root.appendChild(emp);           
              DomTreeBuilder.printDomTree(doc,fout); // Builds The Dom Tree
              System.out.println("Employees XML File is Successfully Generated");
         }catch (Exception e)
         System.err.println("Error while Generating file"+ e.getMessage());
         finally
         fout.close();
    }//end of createXml
    }//end of class createNewsXml
    class DomTreeBuilder
    public static void printDomTree(Node node,FileWriter fout) throws IOException
              int type = node.getNodeType();
              switch (type)
              // print the document element
              case Node.DOCUMENT_NODE:
                   fout.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
                   printDomTree(((Document)node).getDocumentElement(),fout);
                   break;
              // print element and any attributes
              case Node.ELEMENT_NODE:
                   fout.write("<");
                   fout.write(node.getNodeName());
                   if (node.hasAttributes())
                        NamedNodeMap attrs = node.getAttributes();
                        for (int i = 0; i < attrs.getLength(); i++)
                        printDomTree(attrs.item(i),fout);
                   fout.write(">");
              if (node.hasChildNodes())
                        NodeList children = node.getChildNodes();
                        for (int i = 0; i < children.getLength(); i++)
                        printDomTree(children.item(i),fout);
              break;
              // Print attribute nodes
              case Node.ATTRIBUTE_NODE:
                   fout.write(" " + node.getNodeName() + "=\"");
                   fout.write(node.getNodeValue());
                   if (node.hasChildNodes())
                        NodeList children = node.getChildNodes();
                        for (int i = 0; i < children.getLength(); i++)
                        printDomTree(children.item(i),fout);
                   fout.write("\"");
              break;
              // handle entity reference nodes
              case Node.ENTITY_REFERENCE_NODE:
                   fout.write("&");
                   fout.write(node.getNodeName());
                   fout.write(";");
                   break;
              // print cdata sections
              case Node.CDATA_SECTION_NODE:
                   fout.write("<![CDATA[");
                   fout.write(node.getNodeValue());
                   fout.write("]]>");
                   break;
              // print text
              case Node.TEXT_NODE:
                   fout.write(node.getNodeValue());
                   break;
              // print comment
              case Node.COMMENT_NODE:
                   fout.write("<!--");
                   fout.write(node.getNodeValue());
                   fout.write("-->");
                   break;
              // print processing instruction
              case Node.PROCESSING_INSTRUCTION_NODE:
                   fout.write("<?");
                   fout.write(node.getNodeName());
                   String data = node.getNodeValue();
                   fout.write(" ");
                   fout.write(data);
                   fout.write("?>");
                   break;
         } // end of Switch
         if (type == Node.ELEMENT_NODE)
                   fout.write("</");
                   fout.write(node.getNodeName());
                   fout.write('>');
    } // printDomTree(Node)
    } // End of DomBuilder Class
    waiting for the reply soon.
    thanks and regards,
    anitha

    Hi,
    There was no problem in this code. When I executed it worked well, anyway I changed slightly because to add more than one elements. I posted the entire code here:
    Regards
    Baskar
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.DOMException;
    import java.io.File;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.StringTokenizer;
    public class empXml {
         String xmlFilePath = "";
         File xmlFile = null;
         FileWriter fout = null;
         Element emp;
         Element empName;
         Element empDesig;
         Element empDiv;
         // Element newNode;
         public static void main(String[] args) {
              try {
                   empXml x = new empXml();
                   ArrayList ar = new ArrayList();
                   ar.add("baskar,SE,Hitachi");
                   ar.add("krish,SE,Hitachi");
                   ar.add("preet,SE,Hitachi");
                   ar.add("Jan,SE,Hitachi");
                   ar.add("Sam,SE,Hitachi");
                   x.createXml(ar);
              } catch (Exception e) {
                   e.printStackTrace();
         public void createXml(ArrayList arr) throws IOException, DOMException {
              String empl[] = new String[arr.size()];
              arr.toArray(empl);
              try {
                   Iterator itr = arr.iterator();
                   xmlFile = new File("employee.xml");
                   System.out.println(" Employees Information ");
                   fout = new FileWriter(xmlFile);
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   DocumentBuilder docBuilder = dbf.newDocumentBuilder();
                   Document doc = docBuilder.getDOMImplementation().createDocument("",
                             "employee", null);
                   Element root = doc.getDocumentElement();
                   for (int i = 0; i < empl.length; i++) {
                        StringTokenizer st = new StringTokenizer(empl, ",");
                        emp = doc.createElement("emp");
                        empName = doc.createElement("empname");
                        empName.appendChild(doc.createTextNode(st.nextToken()));
                        emp.appendChild(empName);
                        empDesig = doc.createElement("empdesig");
                        empDesig.appendChild(doc.createTextNode(st.nextToken()));
                        emp.appendChild(empDesig);
                        empDiv = doc.createElement("empdiv");
                        empDiv.appendChild(doc.createTextNode(st.nextToken()));
                        emp.appendChild(empDiv);
                        root.appendChild(emp);
                   DomTreeBuilder.printDomTree(doc, fout); // Builds The Dom Tree
                   System.out.println("Employees XML File is Successfully Generated");
              } catch (Exception e) {
                   e.printStackTrace();
              } finally {
                   fout.close();
         }// end of createXml
    }// end of class createNewsXml
    class DomTreeBuilder {
         public static void printDomTree(Node node, FileWriter fout)
                   throws IOException {
              int type = node.getNodeType();
              switch (type) {
              // print the document element
              case Node.DOCUMENT_NODE: {
                   fout.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
                   printDomTree(((Document) node).getDocumentElement(), fout);
                   break;
              // print element and any attributes
              case Node.ELEMENT_NODE: {
                   fout.write("<");
                   fout.write(node.getNodeName());
                   if (node.hasAttributes()) {
                        NamedNodeMap attrs = node.getAttributes();
                        for (int i = 0; i < attrs.getLength(); i++)
                             printDomTree(attrs.item(i), fout);
                   fout.write(">");
                   if (node.hasChildNodes()) {
                        NodeList children = node.getChildNodes();
                        for (int i = 0; i < children.getLength(); i++)
                             printDomTree(children.item(i), fout);
                   break;
              // Print attribute nodes
              case Node.ATTRIBUTE_NODE: {
                   fout.write(" " + node.getNodeName() + "=\"");
                   fout.write(node.getNodeValue());
                   if (node.hasChildNodes()) {
                        NodeList children = node.getChildNodes();
                        for (int i = 0; i < children.getLength(); i++)
                             printDomTree(children.item(i), fout);
                   fout.write("\"");
                   break;
              // handle entity reference nodes
              case Node.ENTITY_REFERENCE_NODE: {
                   fout.write("&");
                   fout.write(node.getNodeName());
                   fout.write(";");
                   break;
              // print cdata sections
              case Node.CDATA_SECTION_NODE: {
                   fout.write("<![CDATA[");
                   fout.write(node.getNodeValue());
                   fout.write("]]>");
                   break;
              // print text
              case Node.TEXT_NODE: {
                   fout.write(node.getNodeValue());
                   break;
              // print comment
              case Node.COMMENT_NODE: {
                   fout.write("<!--");
                   fout.write(node.getNodeValue());
                   fout.write("-->");
                   break;
              // print processing instruction
              case Node.PROCESSING_INSTRUCTION_NODE: {
                   fout.write("<?");
                   fout.write(node.getNodeName());
                   String data = node.getNodeValue();
                        fout.write(" ");
                        fout.write(data);
                   fout.write("?>");
                   break;
              } // end of Switch
              if (type == Node.ELEMENT_NODE) {
                   fout.write("</");
                   fout.write(node.getNodeName());
                   fout.write('>');
         } // printDomTree(Node)
    } // End of DomBuilder Class

  • How to update metadata (e.g. keywords, author) for pdf created from spool

    Hi Experts,
    My requirement is that smart-form spool will be converted into PDF and will be saved on to application server. Now, a third party tool will read the data and print it. I want to update properties of this PDF like author, keywords. These properties can be seen when we save PDF on desktop and right-click on it.
    Please provide pointers to address this issue. Any input will be highly appriciated.
    Regards,
    Gouri.

    Hi,
    Its good that u pasted the complete log file. In your environment you have to run this upgrade tool only once from any of the middle tier.
    And with respect to your error that u got in precheck is quite simple. All u have to do is just run this script from by connecting to portal schema using sqlplus.
    Run dropupg.sql
    Location-------- /raid/product/OraHome_1/upgrade/temp/portal/prechktmp/dropupg.sql
    Later you re-run the upgrade tool and let me know the status.
    Good luck
    Tanmai

  • How to start/run Rule Author GUI?

    hi,
    how we can start / run Oracle Rule Author GUI (part of Oracle Business Rules of Oracle AS)?
    as iv seen most of documentations n tutorials state only the 'usage' of it n none of those describe that how to start / run Rule author gui,,
    Best Regards

    hi ,
    i did all the tasks specified in this guide,,,but it is not mentioned here that how to restart RULEAUTHOR? and when i tried to start it by :
    http://machinename:7777/ruleauthor/
    it gives me HTTP 404 Not Found.
    plz tell me what to do ?
    Best Regards

Maybe you are looking for

  • Error while generating form 16 in portal - Screen output without connection

    Dear Gurus, We are facing error while generating form 16 through portal and getting the below error in portal. Screen output without connection to user.    error key: RFC_ERROR_SYSTEM_FAILURE When we checked for dumps in R/3 the following dump is com

  • Cost of goods sold

    Hi, in KE41, vprs is not defined and also in spro, 'define access to actual costing/material ledger' has no entry. with the above not being defined, may i know how the standard cogs and actual cogs being flown to copa? how can i see the standard cogs

  • 'do not download or install updates automatically' doesn't work 4 my Adobe.

    some people use Adobe just to read from time to time some pdfs on their computer. they dont work with adobe, they dont need "the latest updates", they are happy with what they have. so im a bit frustrated how often adobe is updated while im not inter

  • Strange error message in Captivate 5

    I have been working on a large project for days now, and I have been able to successfully preview the project in the browser each time I have tried until I tried this morning. When I attempted to preview the project, I got an error message that I hav

  • [SOLVED] My usb drives will not automount

    Hi! I've installed a basic Arch system using XFCE4. My USB disks and stick will not automount when I insert them. I have added myself to the usual groups. Manual mounting works however... What could be the issue? Last edited by jerik (2013-01-21 00:2