Forum Discussion

TesterNo1's avatar
TesterNo1
Contributor
10 years ago

How to remove a specific node and its child

 <?xml version="1.0"?>
<faq>
<item>
<q>Question 1</q>
<a>Answer 1</a>
</item>

<item>
<q>Question 2</q>
<a>Answer 2</a>
</item>

<item>
<q>Question 4</q>
<a>Answer 4</a>
</item>

</faq>

 

Hi all,

 

My requirement is to remove only two <item > tags and the child nodes under it 

 

has anyone tried it before 

?

 

Thank you.

 

  • nmrao's avatar
    nmrao
    Icon for Champion Level 2 rankChampion Level 2
    what do you mean by "remove only two <item>"? exactly? and which two?