mat106
08-17-2004, 11:57 PM
Hi.
I have an xml file of the following form:
<phonebook>
<person id="1">
...child nodes go here...
</person>
<person id="2">
...child nodes go here...
</person>
<person id="3">
...child nodes go here...
</person>
etc...
</phonebook>
What i want to do is to be able to remove any one of the <person> elements based on the value of its id attribute. I intend to do that by entering the id value into a form, assigning the id value to a variable in an .asp file and using the variable in conjuction with XML DOM.
The problem however is that i can't find any reference of how to use removechild() (if that's what i'm supposed to use) in order to remove the child element based on the value of its id attribute. Does anyone how this can be done???
Also, if there's a smarter way of doing what i've mentioned please let me know. Thanks.
I have an xml file of the following form:
<phonebook>
<person id="1">
...child nodes go here...
</person>
<person id="2">
...child nodes go here...
</person>
<person id="3">
...child nodes go here...
</person>
etc...
</phonebook>
What i want to do is to be able to remove any one of the <person> elements based on the value of its id attribute. I intend to do that by entering the id value into a form, assigning the id value to a variable in an .asp file and using the variable in conjuction with XML DOM.
The problem however is that i can't find any reference of how to use removechild() (if that's what i'm supposed to use) in order to remove the child element based on the value of its id attribute. Does anyone how this can be done???
Also, if there's a smarter way of doing what i've mentioned please let me know. Thanks.