07-03-2012 02:27 AM
Hi,
Am facing some issue in XPATH query activity in TEO.My XML is having namespace in it.Am not able to get the element value.If i specified the path.
What is the need of namespace box with prefix and uri in the XPATH query tab.I have try all the combinations but no luck.Any idea on this please.
Thanks,
SRAMI.
07-03-2012 07:17 AM
While I do not have time to fully test this. Those xmlns are causing the issue I believe. So (and I've done this before) if you cannot figure out the proper namespace, I just cut that part off before I feed in the source XML.
So I would do a replace string activity and then replace the top line with space and then replace the xmlns parts with space.
That would leave
with data, which should not require any special name spaces. This is one way to do it. Since I'm not too well versed in XML, this is a workaround, although I'm sure someone else could help with the XML side more.
-shaun
09-09-2012 11:18 PM
I know it's bad form to simply say me too but I'm also butting head's with this. I want to match something using the default name space using xPath but it simply says it can't find anything. I think I have to somehow include the default name space URI but there's no clue how to do this as it demands a prefix.
09-11-2012 06:48 AM
Hi, all!
You should probably see my answer to Ryan's question (https://supportforums.cisco.com/thread/2170081?tstart=0).
Basically, when you see this namespace declaration xmlns=http://blah.com in an XML tag (notice that there is no prefix), it simply states that all tags below have this namespace. XML tags have 2 parts to their name a "local" name (what you usually see in the tag, for example
Note that the prefix actually does not matter, and only URI does. So,
So, if you have XML tag defined as
I hope my explanations make sense.
This link provides some background on XML namespaces: http://www.w3schools.com/xml/xml_namespaces.asp.
Svetlana
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide