|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.http.xml.XmlHttpParser
public class XmlHttpParser
XML HTTP parser into an data class of key/value pairs.
Sample usage:
static void setParser(HttpTransport transport) {
XmlHttpParser parser = new XmlHttpParser();
parser.namespaceDictionary = NAMESPACE_DICTIONARY;
transport.addParser(parser);
}
| Field Summary | |
|---|---|
static String |
CONTENT_TYPE
"application/xml" content type. |
String |
contentType
Content type. |
XmlNamespaceDictionary |
namespaceDictionary
XML namespace dictionary. |
| Constructor Summary | |
|---|---|
XmlHttpParser()
|
|
| Method Summary | ||
|---|---|---|
String |
getContentType()
Returns the content type. |
|
|
parse(HttpResponse response,
Class<T> dataClass)
Default implementation parses the content of the response into the data class of key/value pairs, but subclasses may override. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONTENT_TYPE
"application/xml" content type.
public String contentType
CONTENT_TYPE.
public XmlNamespaceDictionary namespaceDictionary
| Constructor Detail |
|---|
public XmlHttpParser()
| Method Detail |
|---|
public final String getContentType()
HttpParser
getContentType in interface HttpParser
public <T> T parse(HttpResponse response,
Class<T> dataClass)
throws IOException
parse in interface HttpParserIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||