Scilab 6.0.1
- Aide de Scilab
- Traitement XML
- htmlDump
- htmlRead
- htmlReadStr
- htmlWrite
- xmlAddNs
- xmlAppend
- xmlAsNumber
- xmlAsText
- xmlDelete
- xmlDocument
- xmlDTD
- xmlDump
- xmlElement
- xmlFormat
- xmlGetNsByHref
- xmlGetNsByPrefix
- xmlGetOpenDocs
- xmlIsValidObject
- xmlName
- xmlNs
- XML Objects
- xmlRead
- xmlReadStr
- xmlRelaxNG
- xmlRemove
- xmlSchema
- xmlSetAttributes
- xmlValidate
- xmlWrite
- xmlXPath
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
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", "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 — Describe the properties of the different XML objects
- xmlDocument — Create a new XML document
- xmlElement — Create a new XML element
- xmlNs — Create a new XML Namespace
- xmlGetNsByHref — Get a namespace by its href
- xmlGetNsByPrefix — Get a namespace by prefix
History
Version | Description |
5.4.0 | XML module introduced. |
Report an issue | ||
<< htmlWrite | Traitement XML | xmlAppend >> |