User Tools

Site Tools


pentominos:libartefact

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
pentominos:libartefact [2010/01/29 09:04] devapentominos:libartefact [2010/01/29 09:14] (current) deva
Line 34: Line 34:
 } }
 </code> </code>
 +
 +=====Replies=====
 +When a reply is received, it can either be obtained from the library in its raw form, on in parsed form, where the XML is evaluated and returned in a recursive structure, much like an XML DOM model.
 +If the result is read in its raw form, the handling of interpretation must be done by the client using the library.
 +This can be useful if the result contains an image as raw binary data, or the parsed data must fit into some already defined internal structure.
 +The raw data is simply a verbatim copy of the character data contained within the reply nodes in the server response document. If the data is raw binary data, it will most likely be base64 encoded, which must be handled by the client using the library.
 +If the raw data is not raw binary data, it will most likely contain a tree of XML nodes, without the header. It is important to note that this XML data cannot be fed directly to a strict XML parser, since it is in itself not a valid XML document. It will however be well balanced. In order to force it to become a valid XML document a single outer (root) element must be added (ex. ''<data>'' and ''</data>''), encapsulating the data. Also a header must be added, containing the following directives: ''<?xml version='1.0' encoding='utf-8'?>''
pentominos/libartefact.1264752296.txt.gz · Last modified: 2010/01/29 09:04 by deva