tags:

views:

55

answers:

2

from XML

<NET ID="10.10.10.10, 255.255.255.0" />

I need to replace the text 10.10.10.10, 255.255.255.0

with 192.9.1.1, 255.0.0.0 by VB + DOM script

so the final line in the XML should be

<NET ID="192.9.1.1, 255.0.0.0" />

THX

+1  A: 

Is this what you are looking for?

document.getElementById("10.10.10.10, 255.255.255.0").setAttribute("id","192.9.1.1, 255.0.0.0");
Thariama
is the sytax of your answer fit for VB script?yael
yael
well, it is javascript (which you could create using VB)
Thariama
how to translate this to VB?
yael
I believe the OP was talking about an XML DOM in an application, not an HTML DOM in a browser.
GalacticCowboy
+1  A: 

I assume this is related to your previous question. You can do it like this:

objRoot.selectSingleNode("./names/NET1").attributes.getNamedItem("ID").text = "192.9.1.1, 255.0.0.0"
Garett
THX allot you have great answer , the short way to replace attryael
yael