OpenWGA 7.7 - TMLScript reference

WGA » WGA.File()
Method :

write(text | XMLDocument, [encoding])

On object WGA.File()
Usage Writes the given content to the file.
Parameters

text | XMLDocument

Text as String or XML as Dom4j XMLDocument.

encoding (String, optional)

The encoding to be used. Default is the configured OpenWGA output encoding (normally UTF-8).

Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
Examples
WGA.File("some-file.txt").write("hallo\nFile")

var xml = WGA.Xml.parse('<tag name="test"/>');
WGA.File("some-file.xml").write(xml);