All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class xe.xe_DocumentParser

java.lang.Object
   |
   +----xe.xe_Parser
           |
           +----xe.xe_DocumentParser

public class xe_DocumentParser
extends xe_Parser
Parser for a whole XML document (or a stand-alone snippet). This is intended to be the top-level parser, applied to whatever body of XML source is to be processed.


Variable Index

 o DOC_STATE_DTD
We are parsing or have just parsed the DTD.
 o DOC_STATE_ELEMENT
We are parsing or have just parsed the main body of the document.
 o DOC_STATE_MISC
We have parsed miscellaneous content (a comment or PI).
 o DOC_STATE_NAMESPACE_DECL
We are parsing or have just parsed namespace declarations.
 o DOC_STATE_START
We are at the start of the document.
 o DOC_STATE_XML_DECL
We are parsing or have just parsed the XML declaration.

Constructor Index

 o xe_DocumentParser()

Method Index

 o getCurrentDocument()
Get the last document parsed.
 o parse()
Parse an XML document, creating a new xg_Document for the purpose.
 o parse(xg_Document)
Main document parse routine.

Variables

 o DOC_STATE_START
 public static final int DOC_STATE_START
We are at the start of the document.

 o DOC_STATE_MISC
 public static final int DOC_STATE_MISC
We have parsed miscellaneous content (a comment or PI). This is used purely to detect whether any of this innocuous content has appeared before an XML declaration - which is a heinous crime and cannot be tolerated.

 o DOC_STATE_XML_DECL
 public static final int DOC_STATE_XML_DECL
We are parsing or have just parsed the XML declaration.

 o DOC_STATE_NAMESPACE_DECL
 public static final int DOC_STATE_NAMESPACE_DECL
We are parsing or have just parsed namespace declarations.

 o DOC_STATE_DTD
 public static final int DOC_STATE_DTD
We are parsing or have just parsed the DTD.

 o DOC_STATE_ELEMENT
 public static final int DOC_STATE_ELEMENT
We are parsing or have just parsed the main body of the document.

Constructors

 o xe_DocumentParser
 public xe_DocumentParser()

Methods

 o parse
 public xg_Node parse() throws IOException
Parse an XML document, creating a new xg_Document for the purpose.

Returns:
The parse tree of the parsed source
Overrides:
parse in class xe_Parser
 o parse
 public xg_Node parse(xg_Document IODocument) throws IOException
Main document parse routine. Look for a sequence of entities, creating a parser object of the appropriate type to parse each one. Continue until the end of the source, or an error occurs. An xg_Document is returned, which contains the full parse tree of the parsed source. Documents roughly have the form: [] [ | ]* [] [ | ]* [ | ]*

Parameters:
IODocument - The document into which the parse results are to be placed
Returns:
The parse tree of the parsed source (= InputDocument)
 o getCurrentDocument
 public xg_Document getCurrentDocument()
Get the last document parsed.

Returns:
The last document parsed

All Packages  Class Hierarchy  This Package  Previous  Next  Index