| || |
need to find a value in XML file and extract one
need to find a value in XML file and extract one of its child nodes
We're using Java but XML questions seem to be web questions, which we're not using. Hope someone would have the code needed to work this.
Anyway, I have an .xml file, about 12 mb long. Using QTP 10, I need to search within the xml file for a specific value (only one of that value will exist in the file). The data will be in a child node (about 3 levels within the parent node). Then, within that parent node, I need to extract a bit of information from another child node on the same level as the search result node.
I know the tag names but I'd rather not have to extract all values given a tag name and then have to loop through the 12 MB file. I'm hoping there's a method that will allow me to pass the needed value and have it return either the parent node or somehow then be able to work within the parent node of the found value. Is there a simple way to do this? Could you provide the code or direction?
I also have use of the .jar file if QTP has ways to access the public functions in it. Would you have information on how/if QTP can do this?