Xml.AddNamespace
Overview
Adds a namespace to the xml node with the given prefix and uri.
void myXml.AddNamespace(prefix: string, ns: string)
Arguments
string prefix
Prefix to add the namespace.
string ns
Namespace URI to specify the namespace.
Example
Making a SOAP Call
var services = $Services.ServiceCards.ServiceCardsSoap.Get({
key: key,
});
Example
SOAP Call Response
<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>
Example
Register namespace and query
services.AddNamespace('tmp', 'http://tempuri.org/');
services.SelectAll('tmp:GetResult/tmp:Item', function(item) {
// do sth with the selected node
});
Copyright © 2010 - 2023 Emakin. All rights reserved.