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.
Sets the given field value (may be null) for the given field name. Any existing value
for the field will be overwritten. It may be more slightly more efficient than #put(String, Object) because it avoids accessing the field's original value.
Overriding is only supported for the purpose of calling the super implementation and
changing the return type, but nothing else.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-13 UTC."],[],[],null,["# Class GenericXml (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.GenericXml)\n- [1.47.1](/java/docs/reference/google-http-client/1.47.1/com.google.api.client.xml.GenericXml)\n- [1.46.3](/java/docs/reference/google-http-client/1.46.3/com.google.api.client.xml.GenericXml)\n- [1.45.3](/java/docs/reference/google-http-client/1.45.3/com.google.api.client.xml.GenericXml)\n- [1.44.2](/java/docs/reference/google-http-client/1.44.2/com.google.api.client.xml.GenericXml)\n- [1.43.2](/java/docs/reference/google-http-client/1.43.2/com.google.api.client.xml.GenericXml)\n- [1.42.3](/java/docs/reference/google-http-client/1.42.3/com.google.api.client.xml.GenericXml)\n- [1.41.8](/java/docs/reference/google-http-client/1.41.8/com.google.api.client.xml.GenericXml) \n\n public class GenericXml extends GenericData implements Cloneable\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\nInheritance\n-----------\n\n[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e [AbstractMap](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html) \\\u003e [GenericData](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData) \\\u003e GenericXml \n\nImplements\n----------\n\n[Cloneable](https://docs.oracle.com/javase/8/docs/api/java/lang/Cloneable.html) \n\nInherited Members\n-----------------\n\n[GenericData.clone()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_clone__) \n[GenericData.entrySet()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_entrySet__) \n[GenericData.equals(Object)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_equals_java_lang_Object_) \n[GenericData.get(Object)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_get_java_lang_Object_) \n[GenericData.getClassInfo()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_getClassInfo__) \n[GenericData.getUnknownKeys()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_getUnknownKeys__) \n[GenericData.hashCode()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_hashCode__) \n[GenericData.put(String,Object)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_put_java_lang_String_java_lang_Object_) \n[GenericData.putAll(Map\\\u003c? extends String,?\\\u003e)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_putAll_java_util_Map___extends_java_lang_String____) \n[GenericData.remove(Object)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_remove_java_lang_Object_) \n[GenericData.set(String,Object)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_set_java_lang_String_java_lang_Object_) \n[GenericData.setUnknownKeys(Map\\\u003cString,Object\\\u003e)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_setUnknownKeys_java_util_Map_java_lang_String_java_lang_Object__) \n[GenericData.toString()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_toString__) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-) \n[AbstractMap.clear()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#clear--) \n[AbstractMap.containsKey(Object)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#containsKey-java.lang.Object-) \n[AbstractMap.containsValue(Object)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#containsValue-java.lang.Object-) \n[AbstractMap.isEmpty()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#isEmpty--) \n[AbstractMap.keySet()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#keySet--) \n[AbstractMap.put(K,V)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#put-K-V-) \n[AbstractMap.putAll(Map\\\u003c? extends K,? extends V\\\u003e)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#putAll-java.util.Map\u003c? extends K-? extends V\u003e-) \n[AbstractMap.size()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#size--) \n[AbstractMap.values()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#values--)\n\nConstructors\n------------\n\n### GenericXml()\n\n public GenericXml()\n\nFields\n------\n\n### name\n\n public String name\n\nOptional XML element local name prefixed by its namespace alias -- for example `\n\"atom:entry\"` -- or `null` if not set.\n\n### namespaceDictionary\n\n public XmlNamespaceDictionary namespaceDictionary\n\nOptional namespace dictionary or `null` if not set.\n\nMethods\n-------\n\n### clone()\n\n public GenericXml clone()\n\nMakes a \"deep\" clone of the generic data, in which the clone is completely independent of the\noriginal.\n\n**Overrides** \n[GenericData.clone()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_clone__)\n\n### set(String fieldName, Object value)\n\n public GenericXml set(String fieldName, Object value)\n\nSets the given field value (may be `null`) for the given field name. Any existing value\nfor the field will be overwritten. It may be more slightly more efficient than #put(String, Object) because it avoids accessing the field's original value.\n\nOverriding is only supported for the purpose of calling the super implementation and\nchanging the return type, but nothing else.\n\n**Overrides** \n[GenericData.set(String fieldName, Object value)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_set_java_lang_String_java_lang_Object_)\n\n### toString()\n\n public String toString()\n\n**Overrides** \n[GenericData.toString()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_toString__)"]]