Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - 日本語 - Русский

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

Scilab help >> XML Management > xmlAsText


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

Calling Sequence

strings = xmlAsText(xp)



xp, a XML mlist typed XMLSet or XMLList


strings, a single row of strings


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.


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

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

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


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.


5.4.0 XML module introduced.
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Apr 02 17:36:22 CEST 2013