# xmlNs

Create a new XML Namespace

## Calling Sequence

                ns = xmlNs(elem, [prefix, [, href]])

## Arguments

elem

  a mlist typed XMLElem

prefix

  a string giving the prefix for this namespace

href

  a string giving the href for this namespace

## Description

Create a new XML namespace associated with a XML element. The created namespace can be used in the element or in its children.

## Examples

        doc = xmlDocument("TMPDIR/foo.xml");
        doc.root = xmlElement(doc, "root");
        ns = xmlNs(doc.root, "scilab", "http://www.scilab.org");
        doc.root.children(1) = "<a>hello</a>";
        doc.root.children(1).namespace = ns;
        xmlDump(doc)

        xmlDelete(doc);

## See Also

- XML Objects
- xmlDocument
- xmlElement
- xmlAddNs
- xmlGetNsByHref
- xmlGetNsByPrefix

## History

5.4.0
XML module introduced.