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


xmlAsText

Convert the result of a XPath query into a row of strings

Syntax

strings = xmlAsText(xp)

Arguments

xp

xp, a XML mlist typed XMLSet or XMLList

strings

strings, a single row of strings

Description

The result of a XPath query or the children of a node can be a set of XMLElements, so the aim of this function is to convert the contents of each nodes into a string.

Examples

doc = xmlReadStr("<root><a>Hello</a><a>Scilab</a><a>World</a></root>");

// Retrieve the content of the nodes with name equal to "a"
xp = xmlXPath(doc, "//a/text()");

// convert the result into a row of strings
data = xmlAsText(xp)

xmlDelete(doc);

See also

  • xmlXPath — Make a XPath query on a XML document
  • xmlAsNumber — Convert the result of a XPath query into a row of numbers
  • xmlName — Retrieve the name of the elements.

History

VersionDescription
5.4.0 XML module introduced.
Report an issue
<< xmlAsNumber Traitement XML xmlDelete >>

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