Methods and structures for parsing an Extensible Markup Language (XML)
data stream are described. In the described embodiment, one or more
schema modules are defined and are associated with HTTP requests that are
received from a client. The schema module(s) has a function that
determines whether an XML data stream conforms to a given schema that is
associated with the HTTP request. If a portion of the XML data stream
does not conform to the given schema, then the schema module disregards
that XML data stream portion. In the described embodiment, each schema
module has a plurality of states associated therewith. Each state is
associated with one or more schema requirements that relate to a
particular element that is evaluated by the schema module. Each state is
different from the other states and the number of states is a function of
the number of layers or elements that are contained within a particular
XML data stream.