Package com.google.api.client.xml (1.43.2)

Classes

GenericXml

Beta
Generic XML data that stores all unknown key name/value pairs.

Each data key name maps into the name of the XPath expression value for the XML element, attribute, or text content (using "text()"). Subclasses can declare fields for known XML content using the Key annotation. Each field can be of any visibility (private, package private, protected, or public) and must not be static. null unknown data key names are not allowed, but null data values are allowed.

Implementation is not thread-safe. For a thread-safe choice instead use an implementation of ConcurrentMap.

Xml

Beta
XML utilities.

Xml.CustomizeParser

Customizes the behavior of XML parsing. Subclasses may override any methods they need to customize behavior.

Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily thread-safe.

XmlNamespaceDictionary

Beta
Thread-safe XML namespace dictionary that provides a one-to-one map of namespace alias to URI.

Implementation is thread-safe. For maximum efficiency, applications should use a single globally-shared instance of the XML namespace dictionary.

A namespace alias is uniquely mapped to a single namespace URI, and a namespace URI is uniquely mapped to a single namespace alias. In other words, it is not possible to have duplicates.

Sample usage:


 static final XmlNamespaceDictionary DICTIONARY = new XmlNamespaceDictionary()
 .set("", "http://www.w3.org/2005/Atom")
 .set("activity", "http://activitystrea.ms/spec/1.0/")
 .set("georss", "http://www.georss.org/georss")
 .set("media", "http://search.yahoo.com/mrss/")
 .set("thr", "http://purl.org/syndication/thread/1.0");
 

XmlObjectParser

Beta
XML HTTP parser into an data class of key/value pairs.

Implementation is thread-safe.

Sample usage:

static void setParser(HttpRequest request, XmlNamespaceDictionary namespaceDictionary) { request.setParser(new XmlObjectParser(namespaceDictionary)); }