RickBeddoe
Programmer
Hello Folks,
I am having a hard time changing the attribute value in the XML file below. I am using XML in a VBA environment.
I have the following XML data:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<root xmlns:link=" <sub xmlns:attr="foo">
</sub>
</root>
I would like to change the value of the 'xmlns:attr' attribute in the 'sub' element. When I use the code below, I get the error "Attempt to modify a read-only node".
If I remove the xmlns prefix from the attribute, it works. Any suggestions?
Set testNode = doc.getElementsByTagName("sub").Item(0) testNode.Attributes.getNamedItem("xmlns:attr").nodeValue = "fi
I am having a hard time changing the attribute value in the XML file below. I am using XML in a VBA environment.
I have the following XML data:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<root xmlns:link=" <sub xmlns:attr="foo">
</sub>
</root>
I would like to change the value of the 'xmlns:attr' attribute in the 'sub' element. When I use the code below, I get the error "Attempt to modify a read-only node".
If I remove the xmlns prefix from the attribute, it works. Any suggestions?
Set testNode = doc.getElementsByTagName("sub").Item(0) testNode.Attributes.getNamedItem("xmlns:attr").nodeValue = "fi