Change XML element
I have xml like:
I would like to replace Payer value, and I did use the following code it is getting node length is "0". Any help??
onst XMLDataFile = "C:\Documents and Settings\kk\Desktop\XML\12.xml"
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = False
Set nodes = xmlDoc.SelectNodes ("/LStructure/LContainer/LBorrowers/PContainer/Party/Payer")
MsgBox "Total books: " & nodes.Length
Set node = xmlDoc.SelectSingleNode("/LStructure/LContainer/LBorrowers/PContainer/Party/Payer)node.Text = "AN01000070708-T"
xmlDoc.SaveFile "C:\Documents and Settings\kk\Desktop\XML\12.xml"
Thanks in advance,
Re: Change XML element
Read the forum guidelines. Thread locked!