I have an XML file that literally has hundreds of child nodes that have the same name.
I am need to update a few of them with values.
The child nodes look like this:
I figured out that I need to get a node list. There are 8 in the node list. I am using:Code:<GA> <GASM> <GASMT>Single Family</GASMT> <GSSMEx>0</GSSMEx> <GASMf>0</GASMf> </GASM> <GASM> <GASMT>1956</GASMT> <GSSMEx>0</GSSMEx> <GASMf>0</GASMf> </GASM> <GASM> <GASMT>Standard Home Inspection</GASMT> <GSSMEx>0</GSSMEx> <GASMf>0</GASMf> </GASM> <GASM> <GASMT>Occupied</GASMT> <GSSMEx>0</GSSMEx> <GASMf>0</GASMf> </GASM> <GASM> <GASMT>Overcast</GASMT> <GSSMEx>0</GSSMEx> <GASMf>0</GASMf> </GASM> <GASM> <GASMT>Wood-Destroying Insect</GASMT> <GSSMEx>0</GSSMEx> <GASMf>0</GASMf> </GASM> </GA>
Set objNodeList = DOM.documentElement.SelectNodes("//Report/templatehma/genInfo/GA/GASM/GASMT")
This produces the typed value for each node"
MsgBox objNodeList.Item(0 through 7).nodeTypedValue
However, when I try to create a single node to update the nodes, the first node is updated, EG
Set Node = DOM.SelectSingleNode("//" & objNodeList.Item(1 through 7).nodeName) references the first node, which is item(0)
How do I reference each node other than the first node?
Thanks for your help




Reply With Quote
