EDN Admin
Well-known member
Hi,
I am very new to the programming world;
I have xml where i need to delete the entire node based on certain attribute; however it has sub tag and per the requirement even that has be deleted;
In the below example i need to delete the tag (item) however it has inner xml (controlref); my requirement is to delete the item with the question(attribute) "Date of entry" in this scenario i need to delete the tags which has "item"
content in it (remove Controlref,itemref and datecl)<br/>
<br/>
Please Help <br/>
<br/>
Thanks in advance
<?xml version="1.0"?><br/>
<br/>
<DATA><br/>
<br/>
<DATECL REFNAME="DOE"<br/>
TEXTFORMAT="false"/><br/>
<br/>
<ITEM REFNAME="DOE"<br/>
QUESTION="Date of Entry"<br/>
LABEL="Date of Entry <br/>
<br/>
<CONTROLREF REFNAME="DOE"/><br/>
<br/>
</ITEM><br/>
<br/>
<br/>
<SECTION REFNAME="DOE <br/>
<br/>
<ITEMREF REFNAME="DOE"/><br/>
<br/>
</SECTION><br/>
<br/>
<br/>
<FORM REFNAME="frmDOE <br/>
<br/>
<SECTIONREF REFNAME="DOE"<br/>
ORDER="1"/><br/>
<br/>
</FORM><br/>
<br/>
</DATA>
View the full article
I am very new to the programming world;
I have xml where i need to delete the entire node based on certain attribute; however it has sub tag and per the requirement even that has be deleted;
In the below example i need to delete the tag (item) however it has inner xml (controlref); my requirement is to delete the item with the question(attribute) "Date of entry" in this scenario i need to delete the tags which has "item"
content in it (remove Controlref,itemref and datecl)<br/>
<br/>
Please Help <br/>
<br/>
Thanks in advance
<?xml version="1.0"?><br/>
<br/>
<DATA><br/>
<br/>
<DATECL REFNAME="DOE"<br/>
TEXTFORMAT="false"/><br/>
<br/>
<ITEM REFNAME="DOE"<br/>
QUESTION="Date of Entry"<br/>
LABEL="Date of Entry <br/>
<br/>
<CONTROLREF REFNAME="DOE"/><br/>
<br/>
</ITEM><br/>
<br/>
<br/>
<SECTION REFNAME="DOE <br/>
<br/>
<ITEMREF REFNAME="DOE"/><br/>
<br/>
</SECTION><br/>
<br/>
<br/>
<FORM REFNAME="frmDOE <br/>
<br/>
<SECTIONREF REFNAME="DOE"<br/>
ORDER="1"/><br/>
<br/>
</FORM><br/>
<br/>
</DATA>
View the full article