f



how to Update/insert an xml element's text----> (<element> text</element>)

hello friends,
                   how can we update or insert into an xml Element.
For example   :
-------------------

<?xml version="1.0">
<request>
      <main>
               <name>ISO8856</name>
      </main>
</request>

here when we run a java class file it should replace "ISO8856"with
"ISO9001". Any Assistance or example.

thanQ in adv.
Ajay
0
msg2ajay (1)
1/29/2008 1:27:53 AM
comp.text.xml 8781 articles. 0 followers. Post Follow

2 Replies
957 Views

Similar Articles

[PageSpeed] 39

HANM wrote:

> <?xml version="1.0">
> <request>
>       <main>
>                <name>ISO8856</name>
>       </main>
> </request>
> 
> here when we run a java class file it should replace "ISO8856"with
> "ISO9001". Any Assistance or example.

If you use the W3C DOM Level 3 Core as implemented in Java 1.5 and later 
then you can select the 'name' element and set its textContent e.g.
   Element name = (Element)xmlDocument.getElementsByTagName("name").item(0);
   name.setTextContent("ISO09001");
If you use DOM Level 2 Core (as implemente in Java 1.4) then you need to 
access the firstChild and set its nodeValue
   Element name = (Element)xmlDocument.getElementsByTagName("name").item(0);
   name.getFirstChild().setNodeValue("ISO09001");


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
0
mahotrash (2052)
1/29/2008 12:14:03 PM
Many good tutorials/articles exist on the web (and some bad ones, alas). 
I usually point people to http://www.ibm.com/xml

-- 
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
0
1/29/2008 3:31:55 PM
Reply:

Similar Artilces:

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** ...

Web resources about - how to Update/insert an xml element's text----> (<element> text</element>) - comp.text.xml

Resources last updated: 3/1/2016 2:27:40 AM