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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Package com.google.api.client.xml (2.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0 (latest)](/java/docs/reference/google-http-client/latest/com.google.api.client.xml)\n- [1.47.1](/java/docs/reference/google-http-client/1.47.1/com.google.api.client.xml)\n- [1.46.3](/java/docs/reference/google-http-client/1.46.3/com.google.api.client.xml)\n- [1.45.3](/java/docs/reference/google-http-client/1.45.3/com.google.api.client.xml)\n- [1.44.2](/java/docs/reference/google-http-client/1.44.2/com.google.api.client.xml)\n- [1.43.2](/java/docs/reference/google-http-client/1.43.2/com.google.api.client.xml)\n- [1.42.3](/java/docs/reference/google-http-client/1.42.3/com.google.api.client.xml)\n- [1.41.8](/java/docs/reference/google-http-client/1.41.8/com.google.api.client.xml) \n[com.google.api.client.util.Beta](/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta) \n\nUtilities for XML.\n\nClasses\n-------\n\n### [GenericXml](/java/docs/reference/google-http-client/latest/com.google.api.client.xml.GenericXml)\n\n[Beta](/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta) \n\nGeneric XML data that stores all unknown key name/value pairs.\n\nEach data key name maps into the name of the XPath expression value for the XML element,\nattribute, or text content (using `\"text()\"`). Subclasses can declare fields for known XML\ncontent using the [Key](/java/docs/reference/google-http-client/latest/com.google.api.client.util.Key) annotation. Each field can be of any visibility (private, package\nprivate, protected, or public) and must not be static. `null` unknown data key names are\nnot allowed, but `null` data values are allowed.\n\nImplementation is not thread-safe. For a thread-safe choice instead use an implementation of\nConcurrentMap.\n\n### [Xml](/java/docs/reference/google-http-client/latest/com.google.api.client.xml.Xml)\n\n[Beta](/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta) \n\nXML utilities.\n\n### [Xml.CustomizeParser](/java/docs/reference/google-http-client/latest/com.google.api.client.xml.Xml.CustomizeParser)\n\nCustomizes the behavior of XML parsing. Subclasses may override any methods they need to\ncustomize behavior.\n\nImplementation has no fields and therefore thread-safe, but sub-classes are not necessarily\nthread-safe.\n\n### [XmlNamespaceDictionary](/java/docs/reference/google-http-client/latest/com.google.api.client.xml.XmlNamespaceDictionary)\n\n[Beta](/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta) \n\nThread-safe XML namespace dictionary that provides a one-to-one map of namespace alias to URI.\n\nImplementation is thread-safe. For maximum efficiency, applications should use a single\nglobally-shared instance of the XML namespace dictionary.\n\nA namespace alias is uniquely mapped to a single namespace URI, and a namespace URI is\nuniquely mapped to a single namespace alias. In other words, it is not possible to have\nduplicates.\n\nSample usage: \n\n\n static final XmlNamespaceDictionary DICTIONARY = new XmlNamespaceDictionary()\n .set(\"\", \"http://www.w3.org/2005/Atom\")\n .set(\"activity\", \"http://activitystrea.ms/spec/1.0/\")\n .set(\"georss\", \"http://www.georss.org/georss\")\n .set(\"media\", \"http://search.yahoo.com/mrss/\")\n .set(\"thr\", \"http://purl.org/syndication/thread/1.0\");\n \n### [XmlObjectParser](/java/docs/reference/google-http-client/latest/com.google.api.client.xml.XmlObjectParser)\n\n[Beta](/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta) \n\nXML HTTP parser into an data class of key/value pairs.\n\nImplementation is thread-safe.\n\nSample usage:\n\nstatic void setParser(HttpRequest request, XmlNamespaceDictionary namespaceDictionary) {\nrequest.setParser(new XmlObjectParser(namespaceDictionary));\n}"]]