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
darma teja
NA
496
336.9k
duplicate nodes based on specific nodes in XML
Aug 17 2016 7:43 AM
my XML file is like this:
<root>
<node1>
<texts>
<text>
<type>type1</type>
<pro1>India</pro1>
<pro2>US</pro2>
<finalText><![CDATA[XXXXXXXXXX]]></finalText>
</text>
<text>
<type>type2</type>
<pro1>India</pro1>
<pro2>US</pro2>
<finalText><![CDATA[YYYYYYYYYY]]></finalText>
</text>
</texts>
<texts>
<text>
<type>type3</type>
<pro1>India</pro1>
<pro2>US</pro2>
<finalText><![CDATA[XXXXXXXXXX]]></finalText>
</text>
<text>
<type>type4</type>
<pro1>India</pro1>
<pro2>US</pro2>
<finalText><![CDATA[YYYYYYYYYY]]></finalText>
</text>
</texts>
</node1>
</root>
I want to duplicate the "text" node for every "pro1" and "pro2" nodes:
The output should be like this:
<root>
<node1>
<texts>
<text>
<type>type1</type>
<pro1>India</pro1>
<finalText><![CDATA[XXXXXXXXXX]]></finalText>
</text>
<text>
<type>type1</type>
<pro2>US</pro2>
<finalText><![CDATA[XXXXXXXXXX]]></finalText>
</text>
<text>
<type>type2</type>
<pro1>India</pro1>
<finalText><![CDATA[YYYYYYYYYY]]></finalText>
</text>
<text>
<type>type2</type>
<pro2>US</pro2>
<finalText><![CDATA[YYYYYYYYYY]]></finalText>
</text>
</texts>
<texts>
<text>
<type>type3</type>
<pro1>India</pro1>
<finalText><![CDATA[XXXXXXXXXXyyyyy]]></finalText>
</text>
<text>
<type>type3</type>
<pro1>US</pro1>
<finalText><![CDATA[XXXXXXXXXXyyyyy]]></finalText>
</text>
<text>
<type>type4</type>
<pro1>India</pro1>
<finalText><![CDATA[zzzzzYYYYYYYYYY]]></finalText>
</text>
<text>
<type>type4</type>
<pro2>US</pro2>
<finalText><![CDATA[zzzzzYYYYYYYYYY]]></finalText>
</text>
</texts>
</node1>
</root>
Advance thanks,
Darma
Reply
Answers (
3
)
how to create user rights for different forms c#
add DataGridViewLinkColumn with changing text in each row