OpenWGA 7.9 - TMLScript reference

WGA
Object:

WGA.Xml

Description

Subobject "Xml" collects functionalities to load and parse Xml documents.

TMLScript uses the Java XML Parser Dom4J to parse and process XML documents. To represent a parsed DOM document the java object class org.dom4j.Document is used throughout these functions.

Note: The functionalities provided here are not to be confused with the XML support directly built into JavaScript called "E4X". E4X is another way to treat XML in TMLScript, that may provide more native  syntax at the cost of less powerful functionality.

Retrieval As global object "WGA.Xml"
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
Properties and methods
Name Purpose
create() Creates a new empty DOM document
load([HttpClient ,] url) Loads an XML document from a URL and parses it as DOM document
parse([xmlText [, url]]) Parses XML text and returns a DOM document object for it
xpath(domobject, xpath [, namespaces]) Executes an XPath expression on some XML text or JavaBean
xpathList(domobject, xpath [, namespaces]) Executes an XPath expression on some XML text or JavaBean, returning a list