locked
Delete xml node c# RRS feed

  • Question

  • 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)

    Please Help

    Thanks in advance

    <?xml version="1.0"?>

    <DATA>

    <DATECL REFNAME="DOE"
        TEXTFORMAT="false"/>

    <ITEM REFNAME="DOE"
        QUESTION="Date of Entry"
        LABEL="Date of Entry">

        <CONTROLREF REFNAME="DOE"/>

    </ITEM>


    <SECTION REFNAME="DOE">

        <ITEMREF REFNAME="DOE"/>

    </SECTION>


    <FORM REFNAME="frmDOE">

        <SECTIONREF REFNAME="DOE"
            ORDER="1"/>

    </FORM>

    </DATA>

    • Moved by 许阳(无锡) Friday, March 18, 2011 7:07 AM Off-topic (From:Visual Studio Tools for Office)
    Sunday, February 27, 2011 3:36 PM

Answers

All replies