This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Change the value of a child element. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Change the value of a child element." Watch "Change the value of a child element." New topic

Change the value of a child element.

vidhi sanghavi

Joined: Mar 28, 2009
Posts: 13

I have an XML structure as follows:


<employee data="Name">

<employee data="qualification">

Whwn I parse the XML document I want to change the value of element <employee data="Name">
to Sami
ie I wan the XML structure to be

<employee data="Name">

<employee data="qualification">

I am using JAVA and org.dom4j.SAXReader

Thanks in advance
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12982
What have you accomplished so far?

Can you locate the <employee> element and get the data attribute value?

I agree. Here's the link:
subject: Change the value of a child element.
It's not a secret anymore!