AddNamespace
Adds a namespace to the xml node with the given prefix and uri.
| myXml.AddNamespace(prefix: string, ns: string):void
|
Parameters
string prefix
Prefix to add the namespace.
string ns
Namespace URI to specify the namespace.
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 sth with the selected node
});
|