All Packages Class Hierarchy This Package Previous Next Index
Class xe.xe_ElementParser
java.lang.Object
|
+----xe.xe_Parser
|
+----xe.xe_ElementParser
- public class xe_ElementParser
- extends xe_Parser
Standard parser for an XML element, assuming the beginning ('
[Content]
-
xe_ElementParser()
-
-
parse()
- Parse the body of an XML element, putting the result in a newly-created
element object.
-
parseAttributes(xg_Element)
- Parse the attributes of an XML element, if it has any.
-
parseContent(xg_Element)
- Parse the content of an XML element, adding it to the InputElement.
-
parseEndTag(xg_Element, xe_Token)
- Parse the end tag, which we expect to be of the form , where Name
is the name of the InputElement.
xe_ElementParser
public xe_ElementParser()
parse
public xg_Node parse() throws IOException
- Parse the body of an XML element, putting the result in a newly-created
element object.
- Returns:
- The parsed element
- Overrides:
- parse in class xe_Parser
parseAttributes
public boolean parseAttributes(xg_Element InputElement) throws IOException
- Parse the attributes of an XML element, if it has any.
Keep looking for 'Name = "Value"' attributes until we encounter '>' or '/>'.
- Parameters:
- InputElement - The element currently being parsed
- Returns:
- Whether the element is empty: true means it is
parseContent
public void parseContent(xg_Element InputElement) throws IOException
- Parse the content of an XML element, adding it to the InputElement.
Treat everything up to the next '' as content (the closing tags of child
elements excepted). This method then parses the remainder of the end tag.
Content can comprise any combination of the following types of entity:
Reference: &Name; or nn; or nn;
CDATA section:
Comment:
Processing instruction:
Element: ...
PCData: Text
... and:
End tag
- Parameters:
- InputElement - The element currently being parsed
parseEndTag
public void parseEndTag(xg_Element InputElement,
xe_Token InputEndTagToken) throws IOException
- Parse the end tag, which we expect to be of the form , where Name
is the name of the InputElement. If the end tag is preceded by whitespace,
it is assumed the whitespace has already been parsed.
- Parameters:
- InputElement - The element currently being parsed
- InputEndTagToken - The body of the end tag - the
All Packages Class Hierarchy This Package Previous Next Index