Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.2 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> XML Management > xmlAddNs

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

History

VersionDescription
5.4.0 XML module introduced.
Report an issue
<< htmlWrite XML Management xmlAppend >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Apr 01 10:13:56 CEST 2015