| java.lang.Object | |
| ↳ | com.google.gdata.wireformats.XmlHandler |
XML handler that translates XML content from a wire format into an in-memory representation.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| element | Element being parsed. | ||||||||||
| metadata | Metadata for this element. | ||||||||||
| parentElement | Parent element, if non-null the element will be added to the parent after it has been fully parsed. | ||||||||||
| qName | This element's QName. | ||||||||||
| value | This element's text() value. | ||||||||||
| vc | Validation context, used to accumulate metadata validation errors discovered during parsing. | ||||||||||
| xmlBase | The current state of xml:base. |
||||||||||
| xmlLang | The current state of xml:lang. |
||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Construct an xml parser that will add the element to its parent after
parsing is completed.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Utility routine that combines the current state of
xml:base
with the specified URI to obtain an absolute URI. | |||||||||||
Utility method to return the value of an xsd:boolean attribute.
| |||||||||||
Default child handler for xml.
| |||||||||||
If a derived class wishes to retrieve all unrecognized XML in a blob,
it calls this method.
| |||||||||||
Called to process an attribute.
| |||||||||||
Called to process this element when the closing tag is encountered.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Create a child element for the given name and metadata.
| |||||||||||
Hook to allow subclasses to change the type of handler being returned.
| |||||||||||
Returns the appropriate metadata to use for the given qualified name.
| |||||||||||
Utility method to parse provided xsd:boolean value.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Parent element, if non-null the element will be added to the parent after it has been fully parsed.
This element's QName. Used for error reporting.
This element's text() value.
Validation context, used to accumulate metadata validation errors discovered during parsing.
The current state of xml:base.
See http://www.cafeconleche.org/books/xmljava/chapters/ch03s03.html for
more information.
The current state of xml:lang.
See http://www.w3.org/TR/REC-xml/#sec-lang-tag for more information.
Construct an xml parser that will add the element to its parent after parsing is completed.
| vc | |
|---|---|
| parent | |
| element | |
| metadata |
Utility routine that combines the current state of xml:base
with the specified URI to obtain an absolute URI.
See http://www.cafeconleche.org/books/xmljava/chapters/ch03s03.html for more information.
| uriValue | URI to be interpreted in the context of xml:base. |
|---|
| ParseException | Invalid URI. |
|---|
Utility method to return the value of an xsd:boolean attribute.
| attrs | Elements attributes to test against. |
|---|---|
| attrName | Attribute name. |
null otherwise.| ParseException | if attribute value is not valid xsd:boolean. |
|---|
Default child handler for xml. This will parse into a Element if
the element has not been declared, otherwise it will parse into the type
defined by the metadata.
| qName | Child element's qualified name. |
|---|---|
| attrs | Child element attributes. These attributes will be
communicated to the child element handler through its
processAttribute(QName, String) method. They are passed here because
sometimes the value of some attribute determines the element's
content type, so different element handlers may be needed. |
| namespaces | List of namespaces in effect for child element. |
null if the child is
unrecognized.| ParseException | if a non-repeating element is repeated, or if the element type requested cannot be created. |
|---|---|
| IOException | from overriding code. Not thrown by the default implementation. |
If a derived class wishes to retrieve all unrecognized XML in a blob,
it calls this method. It must be called in the constructor, in
the parent element handler, or in processAttribute(QName, String).
| xmlBlob | Supplies the XML blob that stores the resulting XML. |
|---|---|
| mixedContent | Specifies that the handler accepts mixed content XML. |
| fullTextIndex | Flag indicating whether unrecognized XML should be processed for full-text indexing. If set, the resulting string ready for indexing is stored in XmlBlob#fullText. |
| IOException |
|---|
Called to process an attribute. Designed to be overridden by derived classes.
| qn | Attribute's qualified name. |
|---|---|
| value | Attribute value. |
| ParseException |
|---|
Called to process this element when the closing tag is encountered. The default implementation refuses to accept text() content, unless the handler is configured to accept unrecognized XML with mixed content.
| ParseException |
|---|
Create a child element for the given name and metadata.
| qName | |
|---|---|
| metadata |
| ParseException |
|---|
Hook to allow subclasses to change the type of handler being returned.
| qName | |
|---|---|
| parent | |
| child | |
| metadata |
Returns the appropriate metadata to use for the given qualified name.
| qName |
|---|
Utility method to parse provided xsd:boolean value.
| booleanValue | Xsd:boolean value to parse |
|---|
null| ParseException | if value is not valid xsd:boolean. |
|---|