Introduction
BOX provides a binary encoding for XML that is:
- easy to understand
-
somewhat human readable
- text values are ASCII or UTF-8
- relationships between the text values are not apparent
- more compact than standard XML
- can be parsed rapidily into a DOM Document
- can be parsed rapidily into a series of SAX events
BOX may be created from a DOM Document using BOXDOMEncoderImpl
or through a series of methods calls in BOXEmitter.
To encode XML in the BOX format using a DOM Document you
- create a DOM Document
- create an OutputStream where the BOX will be written
- specify whether UTF-8 or ASCII should be used
- specify whether whitespace in text nodes should be trimmed
- tell BOXDOMEncoderImpl to encode the Document
See the User's Guide
for examples of this and using BOXEmitter.