Xml AddNamespace Adds a namespace to the XML node with the given prefix and URI.
myXml.AddNamespace(prefix: string, ns: string):void
Parameters string prefix The prefix to associate with the namespace.
string ns Namespace URI to associate with the prefix.
Making a SOAP Call var services = $Services . ServiceCards . ServiceCardsSoap . Get ({
key : key ,
});
SOAP Call Response 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 < GetResponse xmlns = "http://tempuri.org/" >
< GetResult >
< Item >
< Id > 9901 < /Id>
< Name > Maintenance Service < /Name>
< VAT > 18 < /VAT>
< FirmNr > 67 < /FirmNr>
< /Item>
< Item >
< Id > 9902 < /Id>
< Name > Cleaning Service < /Name>
< VAT > 8 < /VAT>
< FirmNr > 68 < /FirmNr>
< /Item>
< /GetResult>
< /GetResponse>
Register namespace and query services . AddNamespace ( 'tmp' , 'http://tempuri.org/' );
services . SelectAll ( 'tmp:GetResult/tmp:Item' , function ( item ) {
// do something with the selected node
});