com.google.api.client.http.xml
Class XmlHttpContent

java.lang.Object
  extended by com.google.api.client.http.xml.AbstractXmlHttpContent
      extended by 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".
 
Fields inherited from class com.google.api.client.http.xml.AbstractXmlHttpContent
contentType, namespaceDictionary
 
Constructor Summary
XmlHttpContent()
           
 
Method Summary
 void writeTo(org.xmlpull.v1.XmlSerializer serializer)
          Writes the content to the given XML serializer.
 
Methods inherited from class com.google.api.client.http.xml.AbstractXmlHttpContent
getEncoding, getLength, getType, retrySupported, writeTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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.

Constructor Detail

XmlHttpContent

public XmlHttpContent()
Method Detail

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.