Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
10 replies
Subscribers
9 subscribers
Views
3878 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
We are consuming a web service response xml and I am able to retrieve data for s
karlaw
over 12 years ago
We are consuming a web service response xml and I am able to retrieve data for specific tags using this syntax:
if( (xpathsnippet(pv!customersOnAccountResponseBody_Txt, "//*[local-name(.)='ReturnCode']/text()")) = "", "", xpathsnippet(pv!customersOnAccountResponseBody_Txt, "//*[local-name(.)='ReturnCode']/text()") )
The problem with the above results is that I get all instances of the tag "ReturnCode". I only want the data from this tag when its in a particular child tag. How would the syntax change above then?
I have tried absolute and realize path's and neither work....
OriginalPostID-60116
OriginalPostID-60116
Discussion posts and replies are publicly visible
Parents
0
Owen Parrish
Appian Employee
over 12 years ago
In XPath, using "//" says, "Get this node everywhere in the XML no matter where it is." In order to specify only some paths to the node, you will need to give the full path instead. I _think_ something like this should work, /root-element/parent/*[local-name(.)='ReturnCode']/text()")) = ""
"root-element" and "parent" should be replaced as appropriate based on your specific XML structure.
I've always relied on the W3Schools XPath tutorial as a reference.
www.w3schools.com/.../
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Owen Parrish
Appian Employee
over 12 years ago
In XPath, using "//" says, "Get this node everywhere in the XML no matter where it is." In order to specify only some paths to the node, you will need to give the full path instead. I _think_ something like this should work, /root-element/parent/*[local-name(.)='ReturnCode']/text()")) = ""
"root-element" and "parent" should be replaced as appropriate based on your specific XML structure.
I've always relied on the W3Schools XPath tutorial as a reference.
www.w3schools.com/.../
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data