com.google.api.client.http.xml
Class XmlHttpContent
java.lang.Object
com.google.api.client.http.xml.AbstractXmlHttpContent
com.google.api.client.http.xml.XmlHttpContent
- All Implemented Interfaces:
- HttpContent
public class XmlHttpContent
- extends AbstractXmlHttpContent
Serializes XML HTTP content based on the data key/value mapping object for an item.
Sample usage:
static void setContent(HttpRequest request, XmlNamespaceDictionary namespaceDictionary,
String elementName, Object data) {
XmlHttpContent content = new XmlHttpContent();
content.namespaceDictionary = namespaceDictionary;
content.elementName = elementName;
content.data = data;
request.content = content;
}
- Since:
- 1.0
- Author:
- Yaniv Inbar
|
Field Summary |
Object |
data
Key/value pair data. |
String |
elementName
XML element local name, optionally prefixed by its namespace alias, for example "atom:entry". |
|
Method Summary |
void |
writeTo(org.xmlpull.v1.XmlSerializer serializer)
Writes the content to the given XML serializer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
elementName
public String elementName
- XML element local name, optionally prefixed by its namespace alias, for example
"atom:entry".
data
public Object data
- Key/value pair data.
XmlHttpContent
public XmlHttpContent()
writeTo
public final void writeTo(org.xmlpull.v1.XmlSerializer serializer)
throws IOException
- Description copied from class:
AbstractXmlHttpContent
- Writes the content to the given XML serializer.
- Specified by:
writeTo in class AbstractXmlHttpContent
- Throws:
IOException - I/O exception
Copyright © 2010-2011 Google. All Rights Reserved.