A method and apparatus are provided for processing a representation of an
XML document to create a sequence of contiguous bytes for transfer from a
source to a destination. The method includes the steps of parsing the
representation of the XML document into a set of information items,
determining a relationship among the information items from the
representation of the XML document, assigning an operation code to each
information element based upon the determined relationship, where each
assigned operation code defines how the associated information should be
interpreted at the destination andforming the operation codes and
information items into a sequence of contiguous bytes suitable for
transfer from the source to the destination, said byte sequence not
depending upon any memory address assigned to the byte sequence.