xml.StaxWriter.writeTo

Sets the output stream of the StaxWriter object to a file or an URL, and starts the streaming.

Syntax

writeTo(
   url STRING )
  1. url is a valid URL or the name of the file that will contain the resulting XML document.

Usage

Throws an exception in case of errors, and updates status with an error code.

Only the following kinds of URLs are supported:
  • http://
  • https://
  • tcp://
  • tcps://
  • file:///
  • alias://

See FGLPROFILE Configuration for more details about URL mapping with aliases, and for proxy and security configuration.

Examples

writeTo("printerList.xml")
writeTo("http://myserver:1100/documents/printerList.xml")
writeTo("https://myserver:1100/documents/printerList.xml")
writeTo("alias://printerlist")
where printerlist alias is defined in fglprofile as ws.printerlist.url = "http://myserver:1100/documents/ptinterList.xml".