Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - Français


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 Traitement XML 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:
Thu Oct 24 11:15:59 CEST 2024