Scilab 6.0.2
- Aide de Scilab
- Traitement XML
- htmlDump
- htmlRead
- htmlReadStr
- htmlWrite
- xmlAddNs
- xmlAppend
- xmlAsNumber
- xmlAsText
- xmlDelete
- xmlDocument
- xmlDTD
- xmlDump
- xmlElement
- xmlFormat
- xmlGetNsByHref
- xmlGetNsByPrefix
- xmlGetOpenDocs
- xmlGetValues
- 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
xmlNs
Create a new XML Namespace
Syntax
ns = xmlNs(elem, prefix, href)
Arguments
- elem
a mlist typed XMLElem
- prefix
a string giving the prefix for this namespace or the empty matrix to have an empty prefix
- 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 — Describe the properties of the different XML objects
- xmlDocument — Create a new XML document
- xmlElement — Create a new XML element
- xmlAddNs — Add a namespace to a XML Element
- 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 | ||
<< xmlName | Traitement XML | XML Objects >> |