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.
-
DOC_STATE_DTD
- We are parsing or have just parsed the DTD.
-
DOC_STATE_ELEMENT
- We are parsing or have just parsed the main body of the document.
-
DOC_STATE_MISC
- We have parsed miscellaneous content (a comment or PI).
-
DOC_STATE_NAMESPACE_DECL
- We are parsing or have just parsed namespace declarations.
-
DOC_STATE_START
- We are at the start of the document.
-
DOC_STATE_XML_DECL
- We are parsing or have just parsed the XML declaration.
-
xe_DocumentParser()
-
-
getCurrentDocument()
- Get the last document parsed.
-
parse()
- Parse an XML document, creating a new xg_Document for the purpose.
-
parse(xg_Document)
- Main document parse routine.
DOC_STATE_START
public static final int DOC_STATE_START
- We are at the start of the document.
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.
DOC_STATE_XML_DECL
public static final int DOC_STATE_XML_DECL
- We are parsing or have just parsed the XML declaration.
DOC_STATE_NAMESPACE_DECL
public static final int DOC_STATE_NAMESPACE_DECL
- We are parsing or have just parsed namespace declarations.
DOC_STATE_DTD
public static final int DOC_STATE_DTD
- We are parsing or have just parsed the DTD.
DOC_STATE_ELEMENT
public static final int DOC_STATE_ELEMENT
- We are parsing or have just parsed the main body of the document.
xe_DocumentParser
public xe_DocumentParser()
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
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)
getCurrentDocument
public xg_Document getCurrentDocument()
- Get the last document parsed.
- Returns:
- The last document parsed
All Packages Class Hierarchy This Package Previous Next Index