
November 26th, 2004, 05:20 AM
|
|
|
|
Problem with getElementsByTagName and appendchild
Hi,
I'm trying to edit a xmldocument. I want to append a new element to a element i've to search in my nodelist, but I 've a problem.
I tried to append the element, but then i recieve the next error:
"Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'appendChild'"
The code i'm using is:
Code:
'Search for all the elements DimensionLevel1
set objDimensionLevel1=objXML.getElementsByTagName("DimensionLevel1")
'for all the nodes
for i = 1 to objDimensionLevel1.length
'Check if the value is the same as the one in my recordset
If objDimensionLevel1.item(i-1).getAttribute("Id") = rsStoredProc("Dl2DimL1") then
'Append the childnode
objDimensionLevel1.appendChild objDimensionLevel2
end if
next
|