Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing A Child Node

Status
Not open for further replies.

goDemons

Programmer
Oct 15, 2005
1
AU
Hey, I've been having trouble removing a child Node in an xml file using an ASP page.
I've been using the following Code:
---------------------------------
Set xmlNodes = xmlfile.DocumentElement.ChildNodes
For Each xmlItem In xmlNodes
strFileName = xmlItem.getAttribute( "filename" )

If strFileName = Request("File") Then
xmlfile.RemoveChild(xmlItem)


End If
Next
--------------------------------

The error i've been getting is "The parameter Node is not a child of this Node"

I've also used xmlNodes.RemoveChild(xmlItem) but I get a type mismatch error....

Any Help Will be Much Appreciated

Thanks Andrew
 
>[tt]xmlfile.RemoveChild(xmlItem)[/tt]
[tt][red]xmlItem.parentNode[/red].RemoveChild(xmlItem)[/tt]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top