TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
JeanNicolas
NA
3
0
Manipulating XML with LinQ
Jan 22 2010 10:46 AM
Hi everybody,
I need some help regarding inserting node on an xml.
I have a xml tree and I want to insert data on a specific location on the tree.
Joining an example. How do I do, if I want to insert a node between Hierarchy with ID_Hierarchy="5" and Hierarchy ID_Hierarchy="6".
<Hierarchy ID_Hierarchy="3" ID_Level="2">
<Text_ref>333</Text_ref>
<Parent>1</Parent>
<Previous>2</Previous>
<Next>4</Next>
<HasChild>true</HasChild>
<Active>true</Active>
<
Hierarchy ID_Hierarchy="5"
ID_Level="3">
<Text_ref>555</Text_ref>
<Parent>3</Parent>
<Previous>0</Previous>
<Next>6</Next>
<HasChild>false</HasChild>
<Active>true</Active>
</Hierarchy>
<
Hierarchy ID_Hierarchy="6"
ID_Level="3">
<Text_ref>666</Text_ref>
<Parent>3</Parent>
<Previous>5</Previous>
<Next>0</Next>
<HasChild>false</HasChild>
<Active>true</Active>
</Hierarchy>
</Hierarchy>
<Hierarchy ID_Hierarchy="4" ID_Level="2">
<Text_ref>444</Text_ref>
<Parent>1</Parent>
<Previous>3</Previous>
<Next>0</Next>
<HasChild>false</HasChild>
<Active>true</Active>
</Hierarchy>
</Hierarchy>
The best solution I can think is to reconstruct the entire node but maybee is there a better solution.
Thanks for the assistance.
Reply
Answers (
2
)
Reading data from Excel sheet using LINQ
What is the best way to recover from missing nodes?