Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
11
Answers
add a new node to xml data
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
darma teja
11y
1.1k
1
Reply
Hi All,
My xml file is like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
- <note>
<step ID="1">
<to><to1>Tove<to1></to>
<from>Jani</from>
</step>
<step ID="2">
<to><to1>Tove1<to1></to>
<from>Jani1</from>
</step>
<step ID="3">
<to><to1>Tove2<to1></to>
<from>Jani2</from>
</step>
</note>
I want to add a new node (<check>ok</check>) to where ID= 2
my xpath is: note/step[ID='2']/to/
final result should be like this in xml file:
<step ID="2">
<to>
<to1>Tove1<to1>
<check>ok</check>
</to>
<from>Jani1</from>
</step>
Thanks
Darma
Post
Reset
Cancel
Answers (
11
)
Next Recommended Forum
C Sharp Code to output text file
how to create isolated storage in console application..?