Discovery pattern to parse XML file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2016 01:41 PM
I'm trying to parse my xml file using advance XPath query option in discovery pattern step.
here is the excerpt of my XML file (<file path>/filename.xml)
<Config xmlns="http://www.myurl.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<property key="myurl" value="https://www.myurl.com"/>
<property key="host.name" value="abc"/>
<property key="user.name" value="xyz"/>
</Config>
Now my parsing strategy is "XML file" and defined a variable called host_name, and here are the details of my Advance screen for that variable:
Root path: . (just the dot)
Name: host_name
XPath query: Config/property[@key="host.name"]/@value
Delimiter: none
Position:1
So when I run my mapping I should expect the value of "host_name" set as "abc" in the Discovery logs. But instead I'm not getting any results all I'm seeing is:
2016-07-29 21:36:51: Command result: 1462783760
2016-07-29 21:36:51: file <file path>/filename.xml was served from cache....
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2017 01:02 PM
We are also having this issue.