WebSend (XmlDoc subroutine)
Serialize XmlDoc as Web response (XmlDoc class)
WebSend converts an XmlDoc to its textually represented XML document to be sent in a response on a Janus Web Server thread. The process of converting to a text string is called serialization, because the text representation of a document is called the serial form.
|doc||An expression that points to the XmlDoc whose content is to be serialized.|
|options||A blank delimited string that can contain one or more (but no duplications) of the following options. |
Note: These options are described in greater detail in "XmlDoc API serialization options".
- The method object, doc, must be well-formed (that is, it must contain an Element node).
- The output line-breaking options make the serialized stream easier to read, for example, for a browser's "view page source" facility to display XHTML produced with Janus SOAP.
- As of Sirius Mods Version 7.6, Attribute values are always serialized within double-quotation-mark (") delimiters, and a double-quotation mark character in an Attribute value is serialized as
". Prior to Sirius Mods Version 7.6, this convention was not strictly observed.
The following Janus Web Server program uses WebReceive to obtain the XML document from the HTTP request, then uses WebSend to buffer some of the received data:
This list is not exhaustive: it does not include all the errors that are request cancelling.
- Method object doc does not contain an Element.
- An options setting is invalid.
- Insufficient free space exists in CCATEMP.
- Use the Serial function to serialize an XmlDoc for sending in some other fashion than as a Web response.
- Additional serializing methods include:
- The function that receives and deserializes a Web XML request is WebReceive.