# xmlAddNs

Add a namespace to a XML Element

## Calling Sequence

                xmlAddNs(elem, [, ns1 [, ns2, ...]])

## Arguments

elem

  a mlist typed XMLElem

nsi

  a mlist typed XMLNs

## Description

Add one or more namespaces to an element

## Examples

        doc = xmlDocument("TMPDIR/foo.xml");
        doc.root = xmlElement(doc, "root");
        a = xmlElement(doc, "a");
        b = xmlElement(doc, "b");
        ns_scilab = xmlNs(a, "scilab", "http://www.scilab.org");
        ns_balics = xmlNs(a, "balics", "http://gro.balics.www");
        xmlAddNs(b, ns_scilab, ns_balics);

        doc.root.children(1) = a;
        doc.root.children(2) = b;
        xmlDump(doc)

        xmlDelete(doc);

## See Also

- XML Objects
- xmlDocument
- xmlElement
- xmlNs
- xmlGetNsByHref
- xmlGetNsByPrefix

## History

5.4.0
XML module introduced.