@Beta public class XmlObjectParser extends Object implements ObjectParser
Beta Implementation is thread-safe.
Sample usage:
static void setParser(HttpRequest request, XmlNamespaceDictionary namespaceDictionary) {
request.setParser(new XmlObjectParser(namespaceDictionary));
}
| Constructor and Description |
|---|
XmlObjectParser(XmlNamespaceDictionary namespaceDictionary)
Creates an XmlObjectParser using the specified non-null namespace dictionary.
|
| Modifier and Type | Method and Description |
|---|---|
XmlNamespaceDictionary |
getNamespaceDictionary()
Returns the XML namespace dictionary.
|
<T> T |
parseAndClose(InputStream in,
Charset charset,
Class<T> dataClass) |
Object |
parseAndClose(InputStream in,
Charset charset,
Type dataType) |
<T> T |
parseAndClose(Reader reader,
Class<T> dataClass) |
Object |
parseAndClose(Reader reader,
Type dataType) |
public XmlObjectParser(XmlNamespaceDictionary namespaceDictionary)
namespaceDictionary - XML namespace dictionarypublic final XmlNamespaceDictionary getNamespaceDictionary()
public <T> T parseAndClose(InputStream in, Charset charset, Class<T> dataClass) throws IOException
parseAndClose in interface ObjectParserIOExceptionpublic Object parseAndClose(InputStream in, Charset charset, Type dataType) throws IOException
parseAndClose in interface ObjectParserIOExceptionpublic <T> T parseAndClose(Reader reader, Class<T> dataClass) throws IOException
parseAndClose in interface ObjectParserIOExceptionpublic Object parseAndClose(Reader reader, Type dataType) throws IOException
parseAndClose in interface ObjectParserIOExceptionCopyright © 2011-2015 Google. All Rights Reserved.