In one embodiment, a method of parsing an XML data stream comprises receiving
an XML data stream containing a namespace prefix and an associated element tag
name. The element tag name is associated with an element tag. The namespace prefix
and the element tag name are converted into a token that uniquely represents a
namespace specification that is associated with the namespace prefix and the element
tag. A stack is defined and is configured to receive one or more tokens during
parsing of the XML data stream. Parsing of the XML data stream is performed without
requiring an XML tree structure comprising an XML document embodied by the XML
data stream, to be built.