Skip to Content
avatar image
Former Member

How to update the existing data in the XML file

Hi all

i am able to create XML file with the sample data as below from webdynpro for 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 webdynpro java programming for only key2,name2,id2 tags only. the remaining tags data in the XML file i want to keep same data except key2,name2,id2

Regards

Sunil

Edited by: Armin Reichert on Nov 30, 2008 4:47 PM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Nov 30, 2008 at 03:49 PM

    This is not Web Dynpro specific. You can use any standard technique for processing XML files like DOM or SAX parsing, XSLT processing etc.

    Armin

    Add comment
    10|10000 characters needed characters exceeded