XmlSpreadsheetsGDataParserFactory.javaAPI DocAndroid 1.5 API4187Wed May 06 22:41:16 BST


public class XmlSpreadsheetsGDataParserFactory extends Object implements
A GDataParserFactory capable of handling Spreadsheets.

Fields Summary
The XmlParserFactory to use to actually process XML streams.
Constructors Summary
public XmlSpreadsheetsGDataParserFactory( xmlFactory)

        this.xmlFactory = xmlFactory;
private XmlSpreadsheetsGDataParserFactory()
Intentionally private.

Methods Summary
public is)

        // attempt a default
        return createParser(SpreadsheetEntry.class, is);
public entryClass, is)

        try {
            XmlPullParser xmlParser = xmlFactory.createParser();
            if (entryClass == SpreadsheetEntry.class) {
                return new XmlSpreadsheetsGDataParser(is, xmlParser);
            } else if (entryClass == WorksheetEntry.class) {
                return new XmlWorksheetsGDataParser(is, xmlParser);
            } else if (entryClass == CellEntry.class) {
                return new XmlCellsGDataParser(is, xmlParser);
            } else if (entryClass == ListEntry.class) {
                return new XmlListGDataParser(is, xmlParser);
            } else {
                throw new ParseException("Unrecognized feed requested.");
        } catch (XmlPullParserException e) {
            throw new ParseException("Failed to create parser", e);
public entry)

        if (entry instanceof ListEntry) {
            return new XmlListEntryGDataSerializer(xmlFactory, entry);
        } else if (entry instanceof CellEntry) {
            return new XmlCellEntryGDataSerializer(xmlFactory, entry);
        } else {
            throw new IllegalArgumentException(
                    "Expected a ListEntry or CellEntry");