Just like JSON, we want to have some sort of easy set of functions to read from an xml document.

I just added this support. Starting point is a String that contains an XML-file:

var xmldoc := someString.asXMLDocument()
Then you can get the nodes using filters (over direct children):
var xmlNodes := xmldoc.getElementsByTagName("author")
Or using XPath:
var xmlNodes := xmldoc.getElementsByXPath("//author")
Get content of elements:
var name := xmlNodes[0].getVal("name") name of first author, equal to:
var name := xmlNodes[0].getElementsByTagName("name").getVal() name of first author
Get attribute values:
var authorId := xmldoc.getElementsByTagName("author")[0].getAttrVal("id")

Submitted by Elmer van Chastelet on 18 August 2015 at 16:20

On 18 August 2015 at 16:20 Elmer van Chastelet closed this issue.

Log in to post comments