Anyone worked with `N/xml` and an XML doc that has...
# suitescript
e
Anyone worked with
N/xml
and an XML doc that has namespaces in it? in particular trying to figure out the XPath for a SOAP response
b
welcome to why i hate namespace with soap
easiest way i know of is to ignore namespace by using
Copy code
local-name()
e
Out of my control sadly
Thanks I'll give it a shot
b
netsuite also has a special name for the default namespace, you can probably find what it is by searching netsuite user group for it
turns out that you cant find it there anymore,
https://system.netsuite.com/app/common/scripting/nlapihandler.nl?downloadapi=T
Copy code
nodes in default namespace can be referenced using "nlapi" as the prefix
e
Your
local-name()
suggestion worked great
Not ideal, of course, but I don't see another way to specify namespaces.
b
you can use name() if you think your webservice wont change the name of the namespace prefix on you
if you want extreme precision, i think you can use namespace-uri() to specify the uri of the namespace