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


xmlAddNs

Add a namespace to a XML Element

Syntax

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", "https://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:
Mon May 22 12:37:07 CEST 2023