Here is my xml
goodI need to get back Result tag’s namespace, which is http://www.test.com
I did the following, convert xml to node, and then using queryXMLNode, but failed. Could someone help me out with this?
Thanks in advance
Here is my xml
goodI need to get back Result tag’s namespace, which is http://www.test.com
I did the following, convert xml to node, and then using queryXMLNode, but failed. Could someone help me out with this?
Thanks in advance
With that XML, I can get it with /Result/@*, but that seems to be the only way to retrieve it.
I tried namespace() and prefix(), which should work, but did not. Also, I got different results with your XML depending on whether I sent it as a file or as a string.
Thanks, but /Result/@*did not work for me either.
I am using IS6.5 SP1.
Verify this thread. It may throw some light on your problem …
[url]wmusers.com
thanks for reply.
Still no luck. Is there a way to get back this namespace using IS SP1?
HI,
Make sure you select XQL from the drop down list when you put the query /Result/@* for getting the namespace. If you use WQL you will not get the correct result.
I am using XQL, the queries tried and failed so far
/Root/Result/@xmlns:test
/Root/Result/namespace()
/Root/Result/prefix()
/Result/@*
/Result/namespace()
/Result/prefix()
How are you sending/testing? HTTP post from outside, Test → Send XML, string input, document input, etc?
when I testing, I set the xmlData in XmlToXMLNode and also set isXML to be true
Ok - I took your XML…
And put it in a sample flow…
pub.xml:xmlStringToXMLNode (with your XML as the xmldata input, and isXML=true)
pub.xml:queryXMLNode (with a variable query set to //Result/@xmlns:test)
And of course it did not work. Nothing works using your XML. As a matter of fact, I keep getting null on every test, even simpler ones.
However, if I make one small change:
It works like a champ.
//Result/@xmlns:test results in http://www.test.com.
Thanks.
This XML
good
is the modified xml. It is a valid xml, isn’t it?
I am dealing with the xml coming from one client, they are using one default namespace at root level and another namespace at child level. I have a need to get back child namespace.
Looks like that webMethods has issue with dealing default namespace with the regular namespace, right?
Certainly seems so in this case, since the quick fix is to not use a default.
However, I remember a fix for default namespaces going all the way back to 4.6.
Anyone with recent experience who can weigh in on this to help foresteverwm?
(There are a number of threads on this forum dealing with default namespaces, most of which seem to be related to SOAP and WSDL.)
//@xmlns:test
courtesy of wM
Hello foresteverwm
Hello foresteverwm
You can use XQL
The Query is RESULT[0]/@*
BR
UEE
Hi
You can use xmlNodeToDocument to get a document
Then get the %document/RESULT/@XMLNS:TEST%
BR
UEE