I have a test case that requires me to pull the XML values for an element out. I have looked into the XMLUtil in QTP 9.5, and I was wondering is there a way to just give it the Node name and pull back the value? I was just going to load the file and use regular expersion to pull What i need out. but i would like to try to do it using the XML methods to pull back the values.
I use the XMLUtil with success:
<font class="small">Code:</font><hr /><pre>
myXMLFilePath = "C:\somefolder\somefile.xml"
myNode = "/nestNode/nestNode/element"
set xmlObj = XMLUtil.CreateXMLFromFile(myxmlFilePath)
Set Collection = xmlObj.ChildElementsByPath(myNode)
for x = 1 to Collection.Count
A good rule of thumb is to never measure with your thumb.