Patent ID: 8346737

Claim:
A method for encoding XML data, the XML data comprising a plurality of tags in a hierarchy, the method comprising: encoding said XML data to produce an encoded representation of said XML data that does not include an encoded representation of a particular tag of the plurality of tags; wherein encoding the XML data comprises: determining whether a schema that corresponds to the XML data constrains the particular tag within the hierarchy to a particular hierarchical level and a particular order within the level, and in response to determining that the particular tag is constrained within the hierarchy to the particular hierarchical level and the particular order within the level, omitting an encoded representation of the particular tag from the encoded representation of said XML data; wherein a constraint specified in the schema associated with the XML data specifies that a particular parent tag in the hierarchy must have only one reference in the hierarchy to a particular child tag followed by only one reference in the hierarchy to the particular tag; wherein the encoded representation of said XML data: includes an encoded representation the particular parent tag, does not include an encoded representation of the particular child tag, and does not include an encoded representation of the particular tag; wherein the method is performed by one or more computing devices.