How to Edit perticular node in XML

How to edit Perticular XML node ?
<root>
<node1>
<data1>   dsfs  </data1>
<data2>   dsfs  </data2>
<data3>   dsfs  </data3>
<data4>   dsfs  </data4>
</node1>
</root>What should i do to change data3 value, means edit data of <data3> ??
help me

Retriece data3 node with XPath or DOM. Set node value with setNodeValue() method.

Similar Messages

  • How to delete a perticular node from xml file using java code

    Hii All,
    Now i am trying to delete a perticular node from xml file.Like...
    XML file:
    <Licence>
    <SERVER>
    <was id="1">1</was>
    <was id="2">2</was>
    </SERVER>
    </LICENCE>
    I am working in messaging service using JABBER framework with whiteboard facility.
    Here Some commands i have created to add,modify,delete nodes from xml file.They Are
    1.If u want to add a new node then.
    create Licence.SERVER <ss id="3">ddd</ss> lic.xml
    (here u want to add a new node called "ss" under Licence.SERVER.
    And lic.xml is tyhe xml file name where it was saved.
    2.If u want to delete a node(Suppose <was id="1">),then the command should be
    delete Licence.SERVER.was:id='"1" lic.xml
    A problem arises that here it find two was attributes.And it delete the last was attribute,not the requested node.
    PLEASE HELP ME IN SOLVING THIS CODE..
    ------------------------------------

    Looks like you clicked on "Post" before you pasted in the code you were talking about.

  • How to edit the node value of a tree in webdynpro java

    Hi ALL
    I have Tree UI element where i got displayed all the nodes by calling the BAPI
    Now my requirement is when i put the cursor at any node in the Tree struture then on click of insert button i need to insert the new node with the text  , the user has to be option to give new text for the new node dynamically  , so while adding the new node in a tree the tree has to choose the text for new node , like how to edit the node of a tree to add new text.
    If any one can send the sample code on the same then it would be great help to me.
    Similar requirement like in table UI Like however we are adding the new row in a table when we click on the insert button then cursor will go to that new row in a table where user can enter his details in the table.. now i am looking for the same requirement in a Tree UI element.
    is it possible the same requirement in tree UI element in webdynpro for Java??
    Thanks
    kallki reddy

    Hi kallki reddy
    In general I think this is not possible in the form you'd like. It seems the Tree control is read-only thing always. It cannot provide editing capabilities.
    Table is different thing. You can select within many different cell editors including Input Fields.
    I guess that you scenario could be implemented not with Tree control, but with Table with Master Column. The master column allows to bring up a hierarchy into a plain table. So it's just a tree inside a table.
    Here you can find further details: [TreeByNestingTableColumn API|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/92/12a74046033913e10000000a155106/content.htm]
    BR, Siarhei

  • How to create a node with XML

    Hi everybody,
    How can I create an XML node?
    I try whith createnode, but don't work
    Thanks
    Carles

    Thanks Gordon,
    I try do understand, but i can't
    I have:
    oNodo = oDocument.SelectSingleNode("BOM/BO/Documents/row/vers")
    if vers doesn't exist, then i have to create it
    <bom>
    <bo>
    <Documents>
    <row>
    <vers>here i want to set a value</vers>
    </row>
    </Documents>
    </bo>
    </bom>
    I've tried with oNewNodo = oDocument.CreateElement("vers") and it works, but doesn't put where i want
    thanks
    Carles

  • Execute Script - How to Update second node in XML group

    Hi,
    I have an XML variable "myXML" which is set to:
    <root>
         <nodes>
              <node>
                   <value>a</value>
              </node>
              <node>
                   <value>b</value>
              </node>
         </nodes>
    </root>
    Question - within an Execute script, how can I easily access and update the second node value? i.e. change "b" to "c"
    The following fails in Execute Script (although it is possible using an XPath expression in a SetValue
      patExecContext.setProcessDataValue("/process_data/myXML/root/nodes/node[1]/value", "c");
    If I have square brackets in this expression then it fails with a nasty error
    Is there an easy way?

    I tired your script in my sandbox and its working fine without fail.
    I noticed an additional space in your xpath expression
      patExecContext.setProcessDataValue("/process_data/myXML/root/nodes/no de[1]/value", "c");
    Can you remove the space within node tag and try again?
    Nith

  • How create Nested Child Nodes in XML Forms

    Hello All:
                        I am very new to XML Forms/KM. I am trying to figure out a way to create Nested Child Nodes schema in XML Forms. Is there a way we can do it?
    Thanks and Regards,
    Vasu.

    Document document;
    NodeList[] dataNodeList=new NodeList[2];
    NodeList nodeList=document.getElementsByTagName("MyData");
    for(int i=0; i<nodeList.getLength(); i++)
    dataNodeList=nodeList.getChildNodes();

  • How to Edit the xml node value using flex from the front end UI

    Hi All,
    I am having a use case with flex 4.6
    1> To read the external xml file
    2> Display the tree structure in the front end UI
    3> Edit the node values of the xml file from the front end UI and save it back
    How to go about the above use case, any blogs or links on the above case will be help
    Thanks,
    Alok

    Check this is example:
    http://blog.flexexamples.com/2009/07/23/deleting-nodes-from-an-xml-object-in-flex/

  • How to read the content in one node of XML in Java? Pls help

    My dear brothers,
    I am a newbie of XML, I have a exercise which is creating a Tree View from XML file. But the trouble is I do not know how to read the content in one node of XML file. I decide to use the algorithm as following:
    1. Create a GUI form which gives the ability for user to choose a XML file (ok)
    2. Load XML and return the file (ok)
    3. Read the file from node to node to create the node in Tree View (?!)
    Please help me, and if you are enough kind, please give me an small example to easy understand. Thanks in advance.
    Hoang Yen Binh

    I hope this one helps you.
         <ABC Type="ProductBased" ProdName="One" Location="India">
              <CEO>Raj</CEO>
              <Finance>Vikram</Finance>
              <HR>Karthik</HR>
              <Technical>Satish</Technical>
         </ABC>
    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.Attr;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.DOMException;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import java.io.File;
    import java.io.IOException;
    public class XmlReading {
         Document doc;
         Element element;
         public static void main(String[] args) throws Exception{
              XmlReading xr = new XmlReading();
              xr.getXmlParser(args);
         public void getXmlParser(String[] args) {
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   if(args.length != 1) {
                        System.err.println("Argument Required");
              try {
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   doc = builder.parse(new File(args[0]));
              }catch(ParserConfigurationException e1) {
              }catch(SAXException e2) {
              }catch(IOException e3) {
              getAttributes();
         public void getAttributes() {
              // Retrive the entire Document from the Dom Tree
              element = doc.getDocumentElement();
    //          System.out.println(element);
              NamedNodeMap attrs = element.getAttributes();
              // Get number of attributes in the element
         int numAttrs = attrs.getLength();
         // Process each attribute
              for (int i=0; i<numAttrs; i++) {
                   Node node = attrs.item(i);
                   // Get attribute name and value
                   String attrName = node.getNodeName();
                   String attrValue = node.getNodeValue();
                   System.out.println(attrName + ": " + attrValue);
              String s1 = element.getTagName();
              System.out.println(s1);
              // To get all the elements in a DOM Tree
              NodeList nl1 = element.getElementsByTagName("*");
              int i2 = nl1.getLength();
              System.out.println(i2);
              for(int i=0; i<i2; i++) {
                   System.out.println(nl1.item(i) + "\n");
    }

  • How can I edit the way autodiscover.xml behaves in SBS 2008 and 2011?

    I have autodiscover working correctly on a few SBS 2008 and SBS 2011 servers. But, its doing its usual misbehaving. When setting up a new Outlook profile, the user enters their email address and password.  Autodiscover is successful in creating all
    the account settings, but at the end of the wizard a username and password window pops up with the users full email address incorrectly filled in as the username, which is why it didn't work.
    This has always been so annoying about SBS.  The user then has to be told to delete their email address in the username field, then fill in "domain\username" instead.  Only then is the authentication successful.
    I've read lots about people adding the external domain UPN Suffix to ADD&T, then manually changing ever users login to domain.com instead of domain.local.   Then you have to mess with the owa authentication settings in exchange to accept the
    UPN.   Its all too ridiculous.  There must be a simpler way.
    I have read about how you can control how the autodiscover.xml behaves, and there are examples of how to do it in this document:
    https://docs.google.com/viewer?a=v&q=cache:0jap1FNKgV0J:https://support.quest.com/Shared/Images/SOL51188_Outlook%2520Automatic%2520Account%2520Configuration.doc+&hl=pl&gl=pl&pid=bl&srcid=ADGEESjizUeFf-JYaM7ZdfIgUCKMMXtcCl0Y3pknFbuwd64GNHIEP1K8a_mpg2YIEisP6sz5DzbtVtdW4Pc42PE0Kjd6bz-3vXz0iaQm7FKi0AnwgvFG_41ZAkBLWynaJtf8s8xyi_d2&sig=AHIEtbSie1mEHTn8el4DPquNxrpovwknUQ
    The document above shows the settings we need to change.  It looks like we can add the local domain using DomainName into the autodiscover.xml and this will stop autodiscover reporting that the full email address is required.  So we
    should be able to get autodiscover to populate the username pop-up with with "domain\user" automatically. 
    OK, so my question is, how on earth do I edit these settings in SBS 2011?  I can't find any articles that talk about how to edit autodiscover. 
    If I could just edit this one setting (that Microsoft should have correctly configured in the first place) autodiscover will work perfectly for all existing users and all future users, without having to do anything.

    Just to straighten out a few things;
    1) This is NOT a bug, rather by design. Not every active directory has an exchange server in place, and MS is assuming you don't want to give your internal domain name out to people (which is why it doesn't default to domain\username)
    2) Going on what I said in 1), this is NOT SBS specific this is the same way with every Active Directory/Exchange install, keep in mind Microsoft did NOT specially design the software for SBS, they just bundled it into a supported configuration in a neat
    little package -since the Exchange server we run on SBS is the same Exchange server powering hundreds of hosted email providers -it makes sense why autodiscover doesn't provide the domain\username (imagine what a mess that would be!)
    3) I understand it's a little bit time consuming but it can actually be done for all users in a matter of seconds, select all users, right click and go to Properties, you can then choose the UPN Suffix for all users. When a new user gets created one of the
    settings in the wizard is the UPN suffix and is easily changeable as long as you notate for the person creating the user to do it. (The problem here is if you're using the SBS Console instead of AD to setup the User in which case that's just an oversight
    in design not a bug in the programming)
    4) You can most certainly have a powershell script that changes the UPN suffix from A to B, let me know if you're interested I'll dig one up for you. That can be run on a scheduled task and will solve the remaining issues you have :)
    I do see you mentioned it in number 3, I must have missed since I didn't re-read the OP before posting the article, however I just tested on several SBS 2011 machines and OWA authentication settings don't have to be changed at all, this worked immediately
    for Outlook Anywhere and Outlook Web Access in my lab and two different customer production systems.
    -GreenlightTech

  • How to edit the existing data in the XML file from java programming.

    Hi all
    i am able to create XML file with the sample data as below from java programming.
    i need sample code on how to edit the existing data in the XML file?
    for example
    <?xml version="1.0"?>
       <mydata>
               <data1>
                         <key1>467</key1>
                        <name1>Paul</name1>
                        <id1>123</id1>
              </data1>
              <data2>
                         <key2>467</key2>
                        <name2>Paul</name2>
                        <id2>123</id2>
              </data2>
        </mydata>
    i am able to insert the data in the XML.
    now i need sample code on how to modify the data in the above XML file from the java programming for only key2,name2,id2 tags only. the remaining tags data in the XML file i want to keep same data except for key2,name2,id2 which are i want to modify from java code
    Regards
    Sunil
    [points will be always rewardable]

    hi
    u need a parser or validate the xml file for to read the xml file from java coding u need for this
    xml4j.jar u can download this file  from here
    http://www.alphaworks.ibm.com/tech/xml4j
    or we can use the SAX(simple API for XML)
    some sample applications for this
    http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
    http://www.developertutorials.com/tutorials/java/read-xml-file-in-java-050611/page1.html
    http://www.xml-training-guide.com/e-xml44.html
    let me know u need any other info
    bvr

  • How to edit an XML file?

    Guys, I have a podcast in iTunes, I want to start to promote it. In order to do this, I think I will have to put tags in the XML file for different sites and I would like to know how to edit this. Does anyone have any good places for me to check out how to do this?
    Thanks!

    Vinnie, thanks for getting back to me on this, I am pulling my hair out!
    What FAQ are you speaking of? The one in iTunes or someplace on this board?
    By claim, what I mean is this. Lets say I try to add my podcast to Podcast Alley's directory. If I copy and paste my RSS feed in there, it says that it needs me to add their "tag" or whatever in my RSS so they know it is my podcast. They need me to add this line in the XML file I think to "claim" my podcast so it will show up in their directory. This seems to be a common thing with other sites as they give me some XML code to add to my RSS also.
    Make sense at all?

  • How to edit bitmap which is imported in flash using xml and save the edited bitmap back to xml in flash.

    hi all
    It would be appreciated if any one let me know how to edit
    bitmap which is imported in flash using xml and save the edited
    bitmap back to xml in flash.
    Is it posible to save the bitmap data in flash?
    thanks in advance

    Yes you can... but like I said before you need to upload the
    data from the changes you make to a server.
    In terms of the solution... its unlikely that you'll find one
    specifically for your needs. You will have to learn whatever you
    don't know how already and maybe adapt some existing examples to
    your needs.
    To change the visual state of a movie clip... you just do all
    the regular things that you want to do to it using flash... scale,
    rotation, drawing API , textfields etc in actionscript. If you
    don't know how to how to do that stuff, then you need to learn that
    first. That's basic actionscript.
    You can capture the visual state of a movieclip using the
    BitmapData class. That includes a loaded jpeg. You can also
    manipulate bimatp data using the same class. You should read up on
    that if you don't know how to use it or check out the examples
    below for uploading info.
    For uploading to the server:
    Here's an as2 solution that took 15 secs to find using
    google:
    http://www.quasimondo.com/archives/000645.php
    If you're using as3, google search for "jpeg encoder as3" and
    look through that info. There are also historical answers in the
    forums here related to this type of thing that might help as
    well.

  • How to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 using ftp

    how to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 device using ftp through Ethernet

    Hello
    For using FTP function in LabVIEW, I recommend you to check this document: FTP Basics
    Also, take a look at FTP Browser.vi, which is available at the Example Finder.
    To edit a XML file, try to use VIs in XML palette. Maybe Write to XML.vi helps you.
    Post your current VI if possible.
    Regards
    Mondoni

  • How to edit weblogic.xml in Jdeveloper web project

    Hi, All,
    I created a web application in Jdeveloper11.1.1.1 and deployed to weblogic server 10.3, I found there is weblogic.xml under WEB-INF folder in war file.
    I try to add something in weblogic.xml, but the problem is I cannot find weblogic.xml in Jdeveloper.
    How to edit weblogic.xml in Jdeveloper? Thanks in advanced.
    Best Regards,
    Bill

    The weblogic.xml file is generated at deploy time if it doesn't exist in your application. To create it specifically in your application at design time for editing, select the appropriate project then the New option, from the New Gallery select General -> Deployment Descriptors -> Weblogic Deployment Descriptor, and in the resulting dialog select the weblogic.xml file. It will be added to the project -> Web Content -> WEB-INF directory.
    Cheers,
    CM.

  • How to edit an XML format report in Report 10G

    Hi
    Please tell me how to edit an XML format report in Report 10G .
    Regards
    Deepak Gupta
    Edited by: user12299081 on Sep 6, 2010 10:19 PM

    Hi
    Please tell me how to edit an XML format report in Report 10G .
    Regards
    Deepak Gupta
    Edited by: user12299081 on Sep 6, 2010 10:19 PM

Maybe you are looking for

  • How to input data into Pdf file

    I am not too sure if I am posting my question in the right forum. I would like to know what version of Adobe acrobat can allow me to create a document, where clients can input data into it? Here is an online example http://www.uscis.gov/files/form/N-

  • Formula to convert DATE

    Hello Experts, I am fetching doc date from oinv table on the crystal report but problem is that it is showing time also with the date and date format is MM/DD/yyyy. I want that only date will show and it should be in format DD/MM/YYYY. please tell me

  • Why can't I add narration now ?

    I have added narration in the past on previous versions of Premiere elements and on Pre 10 but in the last 2 weeks I get an error when I click on the red record button I get a error message that my audio hardware selection does not have any input cha

  • API Reference of SAP Visual Business Geo Maps - SAP UI5

    Hi, I came across a blog post written regarding making SAP Visual Business available on SAPUI5 (since version 1.18) and also came across few demos at this link.  But I am not able to find any API documentation regarding this. We are working on a smal

  • Photos Left in Album Starter 3.2

    I recently purchased Adobe Master Collection 3, when I got it there was no problem with getting my photos that I had from PS2 edition, I asked for an unlock key and never received one, but I had no problem with that because I could file my photos and