DOM Question

webmasterbeta

New Member
Hello All,I have a function that goes thru a domdoc and I want to removeaddress lines that have an empty second attribute? When I run the codeI get method is not supported, what is wrong?Dim iCnt As IntegerDim iCntNodes As IntegerDim sShipTo As StringDim aNodeList As IXMLDOMNodeListDim iShipToCnt As IntegerDim nodeChild As IXMLDOMNodeDim nodeParent As IXMLDOMNodeSet aNodeList = domDoc.selectNodes("//Addresses")iCnt = 0iCntNodes = aNodeList.lengthSet nodeParent = domDoc.documentElementWhile (iCntNodes > 0)If aNodeList.Item(iCntNodes - 1).Attributes(1).Text = "" Then' Deleate the NodeSet nodeChild = aNodeList.Item(iCntNodes - 1)nodeParent.removeChild (nodeChild) //It says the method is not supportedEnd IfiCntNodes = iCntNodes - 1WendShipToCnt_FromAddrSect = iCnt
 
Back
Top