com.google.gdata.data
Class BaseFeed.FeedHandler
java.lang.Object
com.google.gdata.util.XmlParser.ElementHandler
com.google.gdata.data.ExtensionPoint.ExtensionHandler
com.google.gdata.data.Source.SourceHandler
com.google.gdata.data.BaseFeed.FeedHandler
- Enclosing class:
- BaseFeed<F extends BaseFeed,E extends BaseEntry>
public class BaseFeed.FeedHandler
- extends Source.SourceHandler
<atom:feed>
parser.
Method Summary |
XmlParser.ElementHandler |
getChildHandler(java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
Determines a handler for a child element. |
void |
processAttribute(java.lang.String namespace,
java.lang.String localName,
java.lang.String value)
Called to process an attribute. |
void |
processEndElement()
Called to process this element when the closing tag is encountered. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseFeed.FeedHandler
public BaseFeed.FeedHandler(ExtensionProfile extProfile)
processAttribute
public void processAttribute(java.lang.String namespace,
java.lang.String localName,
java.lang.String value)
throws ParseException
- Description copied from class:
XmlParser.ElementHandler
- Called to process an attribute. Designed to be overridden by derived
classes.
- Overrides:
processAttribute
in class XmlParser.ElementHandler
- Parameters:
namespace
- Attribute namespace URI.localName
- Attribute name.value
- Attribute value.
- Throws:
ParseException
- Invalid attribute.
getChildHandler
public XmlParser.ElementHandler getChildHandler(java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
throws ParseException,
java.io.IOException
- Description copied from class:
XmlParser.ElementHandler
- Determines a handler for a child element.
The default implementation doesn't recognize anything. The result is a
schema error unless the parent handler accepts unrecognized XML.
XmlParser
.
localname/namespace.
- Overrides:
getChildHandler
in class Source.SourceHandler
- Parameters:
namespace
- Child element namespace URI.localName
- Child element name.attrs
- Child element attributes. These attributes will be
communicated to the child element handler through its
XmlParser.ElementHandler.processAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.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.
- Returns:
- Child element handler, or
null
if the child is
unrecognized.
- Throws:
ParseException
- Invalid child element.
java.io.IOException
- Internal I/O exception (e.g., thrown by XML blob writer).
processEndElement
public void processEndElement()
- Description copied from class:
XmlParser.ElementHandler
- 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.
- Overrides:
processEndElement
in class ExtensionPoint.ExtensionHandler