I want to retrieve the XPATH of each nodes ( Parent & All Childs nodes ) from an XML. How can I do that using Automation?
<?xml version="1.0" encoding="UTF-8"?>
<n:envelope xmlns:n="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com http://www.google.com/schemas/x.0/Sample.xsd">
<body>Don't forget me this weekend!</body>
<body>Forget me this weekend!</body>
In your XML if you see any tag as below :
Then the value of XPATH will be //p723:name
Hope you get my answer clear.
Test Automation Engineer
Yes. that would be XPATH, but how it is possible to get that from through Automation?
Search for DotNet factory method in QTP.
Do we have any method which can give us the XPATH for a Node?
This is no information on the method for getting XPATH. I can understand on how to get the Value of the node or name of the name or any such info from an XML file. But I'm trying to get any easy way of finding an XPATH for an node.
Try the xpathexplorer.
No , its not working. After installation of the Tool, Manual browsing to the Tree view is giving me a run time error.
Finally got this done from a java program. it is working correctly for me..
I'm just waiting QTP to support Java language some day.