public abstract class

XmlInputParser

extends CharacterParser<T>
java.lang.Object
   ↳ com.google.gdata.wireformats.input.AbstractParser<T>
     ↳ com.google.gdata.wireformats.input.CharacterParser<T>
       ↳ com.google.gdata.wireformats.input.XmlInputParser<T>
Known Direct Subclasses

Class Overview

The XmlInputParser class is an abstract base class supporting the creation of new InputParser implementations that parse XML content. Concrete class will need to implement the both the parse(Reader, InputProperties, Class) and parse(XmlEventSource, InputProperties, Class) methods to handle parsing from the two possible source types.

Summary

[Expand]
Inherited Fields
From class com.google.gdata.wireformats.input.AbstractParser
Public Constructors
XmlInputParser(AltFormat altFormat, Class<T> resultClass)
Creates a new XmlInputParser instance for the provided representation and result type.
Public Methods
<R extends T> R parse(ParseSource parseSource, InputProperties inProps, Class<R> targetClass)
The parse method will use the character encoding found in the output properties instance to construct an appropriate Reader and then delegate to the parse(Reader, InputProperties, Class) method to perform the parsing.
Protected Methods
abstract <R extends T> R parse(XmlEventSource eventSource, InputProperties inProps, Class<R> targetClass)
The parse method should be implemented by subclasses and should parse input data from the provided XmlEventSource instance.
[Expand]
Inherited Methods
From class com.google.gdata.wireformats.input.CharacterParser
From class com.google.gdata.wireformats.input.AbstractParser
From class java.lang.Object
From interface com.google.gdata.wireformats.input.InputParser

Public Constructors

public XmlInputParser (AltFormat altFormat, Class<T> resultClass)

Creates a new XmlInputParser instance for the provided representation and result type.

Parameters
altFormat Parsed representation.
resultClass Parser output result type.

Public Methods

public R parse (ParseSource parseSource, InputProperties inProps, Class<R> targetClass)

The parse method will use the character encoding found in the output properties instance to construct an appropriate Reader and then delegate to the parse(Reader, InputProperties, Class) method to perform the parsing.

Parameters
parseSource
inProps
targetClass
Throws
IOException
ServiceException

Protected Methods

protected abstract R parse (XmlEventSource eventSource, InputProperties inProps, Class<R> targetClass)

The parse method should be implemented by subclasses and should parse input data from the provided XmlEventSource instance.

Parameters
eventSource Event source.
inProps Input properties.
targetClass Result type.
Returns
  • instance of result type.
Throws
IOException error reading data from event source.
ServiceException parsing error.