Updating an XML Mode

I've been studying the use of XML data in Oracle. So far I've been successful in passing xml data from my .NET application and using CLOBS to pass the data. I experimented with various functions such as DBMS_XMLSave...etc. So far, I'm loving it. I can update different tables from one row of a passed XML string inside the CLOB with the unique ID.
However, I hit a bit of a head scratcher. This time, I want to INSERT a new client with a patient id. Now, on the MVC .NET client side, I could easily make a quick call to a small function and return the next available ID to be used as the patient_id and store it in the collection, serialize the xml, and then pass all the data as a clob. Thus my XML will be like this:
<ROWSET>
<ROW>
<PATIENT_ID>5<PATIENT_ID>
<PATIENT_NAME>BOB<PATIENT_NAME>
<ROW>
<ROWSET>
Not a problem, but the question is this - why should I make TWO trips and just do everything at once on the database. So I sent the same data to the procedure but PATIENT_ID is null for the new patient. My plan was to do this:
PROCEDURE INSERT_NEW_PATIENT(paramPatientInfo IN CLOB)
IS
rowcnt NUMERIC;
p_clientid NUMBER;
xmlclob_patientinfo xmltype;
final_patientinfo xmltype;
clob_patientinfo clob;
BEGIN
-- convert the clob to a xml type
xmlclob_patientinfo := XMLTYPE.createXML(paramPatientInfo);
-- get the next available unique id
select H157_CLIENTS_SEQ.Nextval into p_clientid from dual;
-- assign the next unique id into the xmlclob_patientinfo xmltype "string" into final_patientinfo
select updatexml((xmlclob_patientinfo), 'ROWS/ROW/PATIENT_ID/text()', p_clientid ) into final_patientinfo from dual;
-- convert back to a clob
clob_patientinfo := final_patientinfo.getClobVal();
-- begin saving the data to the tables using the new clob_patientinfo as a parameter...
insctx := dbms_xmlsave.newcontext ('PATIENTS_TABLE');
....and so on - this part is not a problem.
So the question is am I doing the right thing in terms of using updatexml(......?

user13573273 wrote:
I've been studying the use of XML data in Oracle. So far I've been successful in passing xml data from my .NET application and using CLOBS to pass the data. I experimented with various functions such as DBMS_XMLSave...etc. So far, I'm loving it. I can update different tables from one row of a passed XML string inside the CLOB with the unique ID.
However, I hit a bit of a head scratcher. This time, I want to INSERT a new client with a patient id. Now, on the MVC .NET client side, I could easily make a quick call to a small function and return the next available ID to be used as the patient_id and store it in the collection, serialize the xml, and then pass all the data as a clob. Thus my XML will be like this:
<ROWSET>
<ROW>
<PATIENT_ID>5<PATIENT_ID>
<PATIENT_NAME>BOB<PATIENT_NAME>
<ROW>
<ROWSET>
Not a problem, but the question is this - why should I make TWO trips and just do everything at once on the database. So I sent the same data to the procedure but PATIENT_ID is null for the new patient. My plan was to do this:
PROCEDURE INSERT_NEW_PATIENT(paramPatientInfo IN CLOB)
IS
rowcnt NUMERIC;
p_clientid NUMBER;
xmlclob_patientinfo xmltype;
final_patientinfo xmltype;
clob_patientinfo clob;
BEGIN
-- convert the clob to a xml type
xmlclob_patientinfo := XMLTYPE.createXML(paramPatientInfo);
-- get the next available unique id
select H157_CLIENTS_SEQ.Nextval into p_clientid from dual;
-- assign the next unique id into the xmlclob_patientinfo xmltype "string" into final_patientinfo
select updatexml((xmlclob_patientinfo), 'ROWS/ROW/PATIENT_ID/text()', p_clientid ) into final_patientinfo from dual;
-- convert back to a clob
clob_patientinfo := final_patientinfo.getClobVal();
-- begin saving the data to the tables using the new clob_patientinfo as a parameter...
insctx := dbms_xmlsave.newcontext ('PATIENTS_TABLE');
....and so on - this part is not a problem.
So the question is am I doing the right thing in terms of using updatexml(......?no.
When your only tool is a hammer, all problems are viewed as nails.
While a hammer is a GREAT tool, it is suboptimal to divide 1 board into 2 pieces
Using XML to interface to Oracle RDBMS does NOT scale.

Similar Messages

  • [svn:bz-3.x] 20638: Update services-config.mods.validators. xml to not include any of the BlazeDS/LCDS classes in the allow list.

    Revision: 20638
    Revision: 20638
    Author:   [email protected]
    Date:     2011-03-07 07:25:25 -0800 (Mon, 07 Mar 2011)
    Log Message:
    Update services-config.mods.validators.xml to not include any of the BlazeDS/LCDS classes in the allow list. These should now be allowed by default by the class deserialization validator.
    Modified Paths:
        blazeds/branches/3.x/qa/apps/qa-regress/WEB-INF/flex/services-config.mods.validators.xml

    Revision: 20638
    Revision: 20638
    Author:   [email protected]
    Date:     2011-03-07 07:25:25 -0800 (Mon, 07 Mar 2011)
    Log Message:
    Update services-config.mods.validators.xml to not include any of the BlazeDS/LCDS classes in the allow list. These should now be allowed by default by the class deserialization validator.
    Modified Paths:
        blazeds/branches/3.x/qa/apps/qa-regress/WEB-INF/flex/services-config.mods.validators.xml

  • Error trying to update web.xml

    I'm trying to update  web.xml via these instructions:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0eb8120-b66c-2910-5795-894f384fc054
    The upload fails, and I see this excetpion in the log:
    Caused by: java.rmi.RemoteException: Error occurred during single file update of
           application sap.com/irj. Reason: Updating the security information in the
           deployment descriptors is not allowed in this operation.; nested exception is:
         com.sap.engine.services.servlets_jsp.server.exceptions.WebDeploymentException:
           Updating the security information in the deployment descriptors is not
           allowed in this operation.
    Ideas?  I'm signing in as Administrator, so why would the operation not be allowed?
    This is a 7.0 system, and the instructions are for a nw2004 system.  We've successfully uploaded the web.xml file before, so I'm thinking that something has changed in 7.0 that's preventing the upload.

    This page of the documentation indicates that the technique is the correct case:
    http://help.sap.com/saphelp_nw70/helpdata/en/6e/8590f1d6d349c9adc34c6a8085189b/frameset.htm
    So, one of two things has happened:
    1. The documentation is in error, or
    2. A bug has been introduced.
    I'm hoping it's #2....

  • Windows 8.1 Won't get updates in audit mode.

    I just installed Windows 8.1 in a Hyper-V virtual machine. The release version that was distributed through msdn not the preview. I enter audit mode as soon as I can, so there have been no changes or customization applied to the install prior to entering
    audit mode. I start up windows update to search for new updates. The status is displayed as "Checking for updates..." "Most recent check for updates: Never." "Updates were installed: Never." The status never changes from "Checking
    for updates...". I have even left it running over night and it still says "Checking for updates...". There is never any error message or failure. Network connectivity is functional. I have attempted an install on a physical machine as well with
    the same result. If instead of entering audit mode a proceed through setting up windows and a user account, updates will work just fine. There should be an update to defender as well as an update to ie11.
    I considered the possibility of a corrupt download so I compared the sha-1 hash to what is listed on the msdn download page and it does match.
     

    Quoted from http://social.technet.microsoft.com/Forums/en-US/afc7f693-f742-402f-b513-063989b79c2f/windows-81-enterprise-windows-updates?forum=w8itproinstall.
     Emphasis added.
    Thank You for sharing the logs. I was able to reproduce the issue in my virtual environment. To understand more about this behavior, I engaged the Product Group and I have been informed that
    this behavior is By Design. WU uses the OOBEComplete() Windows API call to determine whether OOBE is in progress or not, and if so, it will not perform automatic or UI update searches. HRESULT code 0x8024a008 is the WU error code WU_E_AU_OOBE_IN_PROGRESS.
    WU automatic and UI updates won’t run while Setup reports that OOBE is still in progress. This is to prevent automatic updates from causing a system reboot during OOBE, which is – needless to say – a Very Bad Thing. This problem has always existed. Unfortunately,
    when the computer is in Sysprep audit mode, Setup will report to WU that OOBE is in progress even though it might not actually be so. This is the reason that updates from WU UIs are blocked in audit mode.
    I was having the same exact issue when creating an updated WDS image for deployment to select end-users for testing.  At first, I thought I was doing something wrong.  This process--having a VM boot into audit mode so that it can be fully updated
    with Windows Updates along with new and updated third-party applications so to become the baseline/template for deployment--has worked wonderfully since the Vista days.  And it worked perfectly with Windows 8.  Why did Microsoft choose to deprecate
    the functionality is beyond me.
    Its bad enough there is so very little traction in the corporate/Gov't world for Windows 8/8.1.  Now it seems that Microsoft, once again, is hades bent on destroying all that was good with Windows.
    This is to prevent automatic updates from causing a system reboot during OOBE, which is – needless to say – a Very Bad Thing.
    So this was a problem?  Really?  I don't ever recall that happening to me or ever reading about such an issue.  Even if this "issue" was a problem, why not just add another switch to the sysprep command to allow admins to specify
    the allowance of updates.  Something like like sysprep /oobe /audit /AllowUpdates?  Is that too hard or too much to ask?
    So now with the current Windows-won't-update-in-audit-mode default, if I chose to deploy over 200 Windows 8.1 Enterprise clients, I now have to have ALL 200 machines contact Microsoft Update or my internal WSUS (or push via Shavlik) for updates.  Regardless
    of which method is used, the result is that 200 COMPUTERS must consume valuable network bandwidth for updates.  Not to mention there is always several machines that never act right.  Instead of having 200
    identically configured machines, I end up with 200 similarly configured machines.
    Exactly who is making these decisions?  Has anyone experienced the OOBE update issue that Microsoft claims is such a problem?
    So disappointing.

  • Updating a XML document with a processing instruction

    Greetings Guru's
    I have a fully functional XML database solution for our new system. The only thing left is for me to update a xml document in the database with a processing instruction to find the style sheet (JAXB strips it out when the XML must go back into the database).
    I can update complete nodes and node elements in the xml document using updateXML in a regular update statement, but I do not know how to add the following processing instruction to my documents.
    <?xml-stylesheet type="text/xsl" href="/RASWEB/JIT_REPORT.xslt"?>
    [pre]
    Thanks in advance
    Derrick                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    SQL> var xmltext varchar2(4000)
    SQL> --
    SQL> begin
      2    :xmlText := '<Hello>World</Hello>';
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> drop table t
      2  /
    drop table t
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> create table t of xmltype
      2  /
    Table created.
    SQL> set long 10000
    SQL> --
    SQL> insert into t values (xmltype(:xmltext))
      2  /
    1 row created.
    SQL> select *
      2    from t
      3  /
    SYS_NC_ROWINFO$
    <Hello>World</Hello>
    SQL> update t set object_value = updateXML
      2                              (
      3                                object_value,
      4                                '/',
      5                                xmlconcat
      6                                (
      7                                  xmlpi("xml-stylesheet",'type="text/xsl" href="/RASWEB/JIT_REPORT.xslt"'),
      8                                  object_value
      9                                )
    10                              )
    11  /
    1 row updated.
    SQL> select * from t
      2  /
    SYS_NC_ROWINFO$
    <?xml-stylesheet type="text/xsl" href="/RASWEB/JIT_REPORT.xslt"?>
    <Hello>World</Hello>
    SQL>

  • Need to update the xml clob-pls pls help!

    my xml is stored as blob, i can view,do string manipulation and churn out data etc...but now i have a request where i need to find some particualr node and modify its value.
    here is what i m doing now which works.
    select compressor2.blob_decompress2(xml_data) into l_blob
    from tablename where id=2008890;
    clob_data := utl2.blob2clob(l_blob);
    parser := xmlparser.newParser;
    xmlparser.parseClob(parser, clob_data);
    doc := xmlparser.getDocument(parser);
    nl := xmldom.getElementsByTagName(doc, '*');
    len := xmldom.getLength(nl);
    dbms_output.put_line('Length : ' || len);
    tag_name := 'Node Verson : ' || xmldom.getVersion(doc)|| '<br>';
    for counter in 0..len-1
    loop
    tag_name := '';
    node := xmldom.item(nl, counter);
    parent_node := xmldom.getParentNode(node);
    child_node := xmldom.getfirstchild(node);
    tag_name := 'Parent Name : ' || xmldom.getNodeName(parent_node) || '<br>';
    tag_name := tag_name || 'Node Name : ' || xmldom.getNodeName(node) || '<br>';
    IF xmldom.getNodeType(child_node) = xmldom.TEXT_NODE THEN
    tag_name := tag_name || 'Node Value : ' || xmldom.getNodeValue(child_node)|| '<br>';
    ELSE
    tag_name := tag_name || 'Node Value : Node has child.No Node value.' || '<br>';
    END IF;
    tag_name := tag_name || 'Node Type : '||xmldom.getNodeType(child_node) || '<br>';
    ele_name := xmldom.getDocumentElement(doc);
    child_nl := xmldom.getElementsByTagName(ele_name,'*');
    IF xmldom.isNull(doc) THEN
    htp.p('Document is null');
    ELSE
    htp.p(tag_name);
    END IF;
    end loop;
    b_blob := utl.clob2blob(tag_name);
    select compressor2.blob_compress2(b_blob) into b_blob2 from dual;
    insert into xupdate values (2008890,b_blob2);
    i still need to know how to update the xml clob... i want to know how to find the particular node and then modify the clob with the new value. rest i can update the table.
    pls pls help..on this.

    my oracle version.
    10.2.0.1.0
    i want to update here..
    <?xml version="1.0" encoding="utf-8"?>
    <TestData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <Status>CompletedNormally</TestCompletionStatus>
         <ComputerName>DUILT10</ComputerName>
         <StartTime>2008-03-19T15:12:23</StartTime>
    ---Some more noded----
    <Parameters>
              <RangeMeasured>
                   <Name>PDissBol-5[C]</Name>
                   <Min>1.22</Min>
                   <Max>1.36</Max>
                   <Units>W</Units>
              </RangeMeasured>
              <TextMeasured>
                   <Name>ComputerName</Name>
                   <Value>DUILT10</Value>
              </TextMeasured>
              <RangeMeasured>
                   <Name>TrackError25[C]To-5[C]</Name>
                   <Min>0.031</Min>
                   <Max>0.041</Max>
                   <Units>dB</Units>
              </RangeMeasured>
              <RangeMeasured>
                   <Name>Power-5[C]</Name>
                   <Min>1.988</Min>
                   <Max>1.061</Max>
                   <Units>dBm</Units>
              </RangeMeasured>
    ---some more noded---
    </Parameters>
    </TestData>
    the file is huge.
    what i need to chang==>
    I 1st need to find this PDissBol-5[C] within the <Parameters> Node and then change its <Min> and <Max>
    and then update the table.
    pls pls suggest.

  • Database updation using XML and stored Procedure?

    Hello,
    I want to perform updation in multiple tables using XML files.Please suggest can I do updation using xml and stored procedure.
    If yes then which is more efficient and takes less time.
    1.Updation using xml files only
    2.Updation using xml files with stored procedure.
    3.Stored procedure alone.
    If direct xml and stored procedure communication is possible.then please write how.
    Thanks in advance for any help.

    Here's a sample. The next code drop of the XSQL Servlet will make the easy-to-do from within XSQL Pages:
    package package1;
    import org.w3c.dom.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    public class Class1 extends Object {
    public static void main( String[] arg ) throws Exception {
    Connection conn = getConnection();
    CallableStatement ocs = conn.prepareCall("begin ? := App.HotItems('PAUL'); end;");
    ocs.registerOutParameter(1,OracleTypes.CURSOR);
    ocs.execute();
    ResultSet rs = ((OracleCallableStatement)ocs).getCursor(1);
    OracleXMLQuery oxq = new OracleXMLQuery(conn,rs);
    System.out.println(oxq.getXMLString());
    oxq.close();
    rs.close();
    ocs.close();
    conn.close();
    public static Connection getConnection() throws Exception {
    String username = "scott";
    String password = "tiger";
    String dburl = "jdbc:oracle:thin:@localhost:1521:xml";
    String driverClass = "oracle.jdbc.driver.OracleDriver";
    Driver d = (Driver)Class.forName(driverClass).newInstance();
    return DriverManager.getConnection(dburl,username,password);
    null

  • How to updating plugin.xml when it changed in 12C?

    After Importing the Plug-in Archive and Deploying it on Management Service with 12C, I need to make a change with plugin.xml in Plug-in Archive. Here it's the change,
    --- Old one:
    <PluginAttributes Type="MP" ReleaseStatus="Test"/>
    --- Change to:
    <PluginAttributes Type="MP" DisplayName="MySQL Database" Category="Databases"/>
    So I un-deployed Plug-in from Management Serbice, and used command "emcli import_update" to update the brand new OPAR file successfully, and the deployed again. But it seems the new plugin.xml didn't work at all, neither from UI nor the plugin.xml located under Management Server folder. I am sure it should work cause after I changed the Target Type and etc. in all related files to made a new plug-in, it works well.
    So how to updating plugin.xml when it changed in 12C? (It seems there is no option with MRS.)
    Thanks in advance!
    Best wishes,
    Satine

    Hey Caroy,
    Thank you for your help.
    It seems there is no entrance within page "Setup->Extensibility->Self Update" to delete a plugin. Would you please tell me more specific position?
    I will upgrade the version of plugin and try again to see if it works.
    Thanks,
    Satine

  • How to update an XML file?

    hi,
    I am having an xml file like this.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE map [ <!ELEMENT map (entry*) >
    <!ELEMENT entry EMPTY >
    <!ATTLIST entry key ID #REQUIRED
    value CDATA "mydefault"> ]>
    <map>
    <entry key="key1" value="xxx"/>
    <entry key="key2" value="yyy"/>
    </map>
    I have written a DOMparsing program to parse this XML file. And the program is this,
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.TransformerException;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import java.io.File;
    import java.io.IOException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.DOMException;
    import org.w3c.dom.Attr;
    import org.w3c.dom.NodeList;
    public class DomExample
    public static void main(String args[])
    // Obtain an XML document; this method is implemented in
    Document doc = parseXmlFile("sample1.xml", true);
    //Getting elements by Tag name
    NodeList nodeList= doc.getElementsByTagName("entry");
    // Obtain an element
    Element element = (Element)(nodeList.item(0));
    element.removeAttribute("value");
    element.setAttribute("value", "Manivannan");
    try
    TransformerFactory tFactory =TransformerFactory.newInstance();
    StreamSource stylesource = new StreamSource();
    Transformer transformer = tFactory.newTransformer(stylesource);
    DOMSource source = new DOMSource(doc);
    //File f1 = new File("Sample3.xml");
    StreamResult result = new StreamResult(System.out);
    transformer.transform(source, result);
         catch(TransformerException te)
         te.printStackTrace();
    public static Document parseXmlFile(String filename, boolean validating) {
    try {
    // Create a builder factory
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setValidating(validating);
    DocumentBuilder builder = factory.newDocumentBuilder();
    // Create the builder and parse the file
    Document doc = builder.parse(new File(filename));
    return doc;
    } catch (SAXException e) {
    // A parsing error occurred; the xml input is not valid
    } catch (ParserConfigurationException e) {
    } catch (IOException e) {
    return null;
    Now what i am trying to do is replace value xxx in my xml with "Manivannan" and yyy with "gopalan"..But what i am getting during running this program is i am getting MalformedURL exception..Also will this program be able to update my xml with new values.If not possible pls let me know the method to update my xml file.
    Thanks for your reply in advance.

    Replace
    StreamSource stylesource=new StreamSource();
    Transformer transformer=tfactory.newTransformer(stylesource);with
    Transformer transformer=tfactory.newTransformer();

  • Update the xml file using jsp

    Hi all,
    I want to update the xml file node values.I tried this but the node values is not updating ie not changing
    This is my code
    This my 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>
    <%try
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse("http://localhost:8084/XmlApplication1/sss.xml");
    String name = "Banglore";
    NodeList nlst = doc.getElementsByTagName("name");
    Node node= nlst.item(0).getFirstChild();
    // Node nod2=node.getFirstChild();
    node.setNodeValue(name);
    catch(Exception e)
    out.println(e) ;
    %>
    This is my xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <place>
    <name>chennai</name>
    </place>
    plz do some help to update this value

    i tried this but the data is just transfereinf in xml file but its not over writet he content in xml file.
    i send my code
    <%@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"
    %>
    <%@ page import=" org.w3c.dom.*,java.io.File,java.io.IOException,java.io.OutputStream,java.io.FileOutputStream,
    javax.xml.parsers.*,
    javax.xml.transform.*,
    javax.xml.transform.dom.*,
    javax.xml.transform.stream.*
    " %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <%
    String bgcolor = request.getParameter("bgcolor");
    String heading = request.getParameter("heading");
    String fontsize = request.getParameter("fontsize");
    String fontcolor = request.getParameter("fontcolor");
    String str1="";
    String str2="";
    try{
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse("http://localhost:8084/XmlApplication1/input.xml");
    Document tempDocument = doc;
    DOMSource source = new DOMSource(tempDocument);
    NodeList n11 = doc.getElementsByTagName("bgcolor");
    Node n1= n11.item(0).getFirstChild();
    str1 = n1.getNodeValue();
    out.println(str1);
    n1.setNodeValue(bgcolor);
    out.println("After change");
    str2 = n1.getNodeValue();
    out.println(str2);
    NodeList n12 = doc.getElementsByTagName("heading");
    Node n2= n12.item(0).getFirstChild();
    String str11 = n2.getNodeValue();
    out.println(str11);
    n2.setNodeValue(heading);
    out.println("After change");
    String str22 = n2.getNodeValue();
    out.println(str22);
    NodeList n13 = doc.getElementsByTagName("fontsize");
    Node n3= n13.item(0).getFirstChild();
    String str13 = n3.getNodeValue();
    out.println(str13);
    n3.setNodeValue(fontsize);
    out.println("After change");
    String str23 = n3.getNodeValue();
    out.println(str23);
    NodeList n14 = doc.getElementsByTagName("fontcolor");
    Node n4= n14.item(0).getFirstChild();
    String str14 = n4.getNodeValue();
    out.println(str14);
    n4.setNodeValue(fontcolor);
    out.println("After change");
    String str24 = n4.getNodeValue();
    out.println(str24);
    // File file = new File("D:/Leela/XmlApplication1/build/web/input.xml");
    OutputStream outStream = new FileOutputStream("D:/Leela/XmlApplication1/build/web/input.xml");
    StreamResult result = new StreamResult(outStream);
    Transformer xformer = TransformerFactory.newInstance().newTransformer();
    System.out.println("Wrote to new file");
    xformer.transform(source, result);
    outStream.flush();
    outStream.close();
    catch(Exception e)
    out.println();
    %>
    </body>
    </html>
    the xml file shows the same content its not ovwr writing
    <?xml version="1.0" encoding="UTF-8"?>
    <input>
    <bgcolor>DarkCyan</bgcolor>
    <heading>4</heading>
    <fontsize>12</fontsize>
    <fontcolor>DodgerBlue</fontcolor>
    </input>

  • Update of XML syndication map when XSD is changed

    All,
    So we recently upgraded to MDM 7.1 SP 06 and found a new feature which we were waiting for quiet some time. Thought i'll share with the community as well.
    Update of XML syndication map when XSD is changed in Console
    In earlier SP's of MDM, if we had to update an XML syndication map, we had to upload the new XSD in Console, go to syndicator and basically re-create the whole map. there was no way for syndicator to preserve the old mapping.
    Well with this new feature, the old mapping is preserved, we only need to re-map the new fields.
    The process is as below:
    1. Upload the new XSD in Console.
    2. Go to syndicator and open the syndication map which you want to update(File->Open).
    3. Click File -> Update XML Schema. (this is the new option)
    4. It will give a pop-up, select the new schema you have uploaded in console and hit OK.
    5. You will get a prompt saying that syndication map is being changed, hit OK.
    6. Now you will see the new XSD in syndicator, the older fields are still mapped, you only need to map the new fields.
    It a nice feature which will definitely save lot of time. Thanks SAP
    Regards
    Aamir

    If this post answered your question or helped, please mark it as such.
    This works.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.events.DataGridEvent;
          import mx.collections.ArrayCollection;
          [Bindable] private var ac:ArrayCollection = new ArrayCollection([
            {bgColor: "0xFF0000", num: 100, name: "Test1"},
            {bgColor: "0xFF0000", num: 200, name: "Test2"},
            {bgColor: "0xFF0000", num: 300, name: "Test3"},
          private function changeBK(evt:DataGridEvent):void{
            var row:uint = evt.rowIndex;
            var data:Object = ac.getItemAt(row);
            data.bgColor = "0x00FF00";
        ]]>
      </mx:Script>
      <mx:DataGrid id="dg" dataProvider="{ac}" itemEditEnd="changeBK(event);"
        editable="true">
        <mx:columns>
          <mx:DataGridColumn dataField="num">
            <mx:itemRenderer>
              <mx:Component>
                <mx:TextArea backgroundColor="{data.bgColor}" text="{data.num}"/>
              </mx:Component>
            </mx:itemRenderer>
          </mx:DataGridColumn>
          <mx:DataGridColumn dataField="name"/>
        </mx:columns>   
      </mx:DataGrid>
    </mx:Application>

  • Change XML mode text to mode binary

    Hi guys,
    In PI 7.0 when i do one call to RFC (RFC Receiver) the message between PI and ECC is a XML mode text.
    Anbody know how can i change XML mode text to mode binary ? (traffic in my network xml binary instead of xml text)
    Can anybody help me, please ?

    Hi
    According to my knowledge its not possible for the  RFC receiver adapter if the RFC is the standard one, for other adapters like file we can set this.
    Give that File type as Binary in the sender communication channel and test.
    Regards
    Ramesh

  • Saving report results in xml mode

    Dear all,
    Do i have chance to save query results in xml mode?
    thanks

    Execute BW query using ABAP Part III

  • TS3694 iOS 7.02 update made my iPad stay frozen on the appl logo.  What's more, a factory update in DFU mode won't work either, I get error code 3194 - any tips on what I should do?  It is an iPad2 on iOS 5 something, the one just before Apple removed You

    iOS 7.02 update made my iPad stay frozen on the appl logo.  What's more, a factory update in DFU mode won't work either, I get error code 3194 - any tips on what I should do?  It is an iPad2 on iOS 5 something, the one just before Apple removed YouTube...

    iOS 7.02 update made my iPad stay frozen on the appl logo.  What's more, a factory update in DFU mode won't work either, I get error code 3194 - any tips on what I should do?  It is an iPad2 on iOS 5 something, the one just before Apple removed YouTube...

  • Is there update to XML Export Extension?

    I just updated ADDT to version 1.0.1 for my Dreamweaver CS3   when it got down installing and I restarted Dreamweaver I got a popup message saying that there is a new update to XML Export Extension and to go to Adobe's website to check it out.
    I can't find any mention of this extension on the site even though I have it.  Was there an actual update to this extension or was it just bogus message?
    I have DW CS3, ADDT 1.0.1 and XML Export Extension 1.00
    If there was an update can someone point me to where I can download it?
    Thank you.

    I believe it's a bogus message even if there is one this is the best query to xml script.

Maybe you are looking for