|
Try this,
Set xmlDoc = CreateObject( "Microsoft.XMLDOM" )
xmlDoc.load("c:\test.xml")
Set objNodeList = xmlDoc.getElementsByTagName("PutYourTagHere")
For i = 0 To (objNodeList.length - 1)
set str = objNodeList.Item(i)
print str.text
Next
You can get tonnes of information about XMLUTIL object from the QTP Help. The above one is using API.
Try this if you want to use XMLUtil Object,
Set doc = XMLUtil.CreateXML()
doc.LoadFile "c:\example.xml"
Set root = doc.GetRootElement
msg = "My name is "
nameStr = root.ElementName()
valueStr = root.Value()
msgbox msg+nameStr + " and my value is " + valueStr
Let me know if it answers your question.
|