xml.StaxWriter.writeTo
Sets the output stream of the StaxWriter object to a file or an URL, and starts the streaming.
Syntax
writeTo(
name STRING )
- name defines a valid URL or the name of the file that will contain the resulting XML document.
Usage
This method sets the output stream of the StaxWriter
object to a file or an URL
specified in name, and starts the streaming.
Only the following kinds of URLs are supported:
- http://
- https://
- tcp://
- tcps://
- file:///
- alias://
In case of error, the method throws an exception and sets the
STATUS
variable. Depending on the error, a human-readable description of the
problem is available in the SQLCA.SQLERRM
register. See Error handling in GWS calls (STATUS).
Examples
writeTo("printerList.xml")
writeTo("http://myserver:1100/documents/printerList.xml")
writeTo("https://myserver:1100/documents/printerList.xml")
writeTo("alias://printerlist")
In the example printerlist
alias is defined in fglprofile as ws.printerlist.url =
"http://myserver:1100/documents/ptinterList.xml"
.