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

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

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

Aide de Scilab >> Gestion des fichiers XML > xmlName

xmlName

Retrieve the name of the elements.

Calling Sequence

names = xmlName(obj)

Arguments

obj

obj, a XML mlist typed XMLSet or XMLList or XMLElem or XMLAttr

name

names, a single row of strings

Description

Retrieve the name(s) of the elements composing the XMLObject.

Examples

doc = xmlReadStr("<root><foo a=""123"" b=""456"" c=""789""/></root>")

// Retrieve the name of a single element
xmlName(doc.root.children(1))

// Retrieve the names of an attributes list
xmlName(doc.root.children(1).attributes)

// Retrieve the names of the result of a XPath query
xmlName(xmlXPath(doc,"//foo/@*"))

xmlDelete(doc);

See Also

  • xmlXPath — Make a XPath query on a XML document
  • xmlAsText — Convert the result of a XPath query into a row of strings
  • xmlAsNumber — Convert the result of a XPath query into a row of numbers

History

VersionDescription
5.4.1 xmlName function introduced.
Report an issue
<< xmlIsValidObject Gestion des fichiers XML xmlNs >>

Copyright (c) 2022-2023 (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 02 13:54:34 CEST 2014