Suppose if both the xml's are having the same NodeName and also same number 
of nodes,  but nodevalues are different. I want to update the nodevalue 
with the value in the other xml.

Set ObjXml=CreateObject("microsoft.XMLDOM")
ObjXml.Async=false

'##### below are 2 xml docs
set xmlDoc1 =ObjXml.CreateXMLFromFile("C:\Documents and 
Settings\Ravi\Desktop\delete\Copy of Environment.xml")
set xmlDoc2 =ObjXml.CreateXMLFromFile("C:\Documents and 
Settings\Ravi\Desktop\delete\Copy of Copy of Environment.xml")

set srcValueNode=xmlDoc1.selectnodes("/Environment/Variable/Value/text()")
set destValueNode=xmlDoc2.selectnodes("/Environment/Variable/Value/text()")


For i=0 to srcValueNode.length-1
destValueNode(i).nodevalue=    srcValueNode(i).nodevalue
next
    
xmlDoc2.save("C:\Documents and Settings\Ravi\Desktop\delete\Copy of Copy of 
Environment.xml")

set srcValueNode=nothing
set destValueNode=nothing
Set xmlDoc1=nothing
Set xmlDoc2=nothing
Set nodes=nothing
Set ObjXml=nothing

But this is not working.plz let me know any other ways u know

-- 
-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

--- 
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to