@Test public void testParseToAnyTypeAdditionalField() throws Exception { AnyTypeAdditionalFieldGeneric xml = new AnyTypeAdditionalFieldGeneric(); XmlPullParser parser = Xml.createParser(); parser.setInput(new StringReader(ANY_TYPE_XML)); XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); Xml.parseElement(parser, xml, namespaceDictionary, null); assertNotNull(xml); assertEquals(4, xml.values().size()); XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); serializer.setOutput(out, "UTF-8"); namespaceDictionary.serialize(serializer, "any", xml); assertEquals(ANY_TYPE_XML, out.toString()); }
@Override public String toString() { XmlNamespaceDictionary namespaceDictionary = this.namespaceDictionary; if (namespaceDictionary == null) { namespaceDictionary = new XmlNamespaceDictionary(); } return namespaceDictionary.toStringOf(name, this); }
GenericXml extends GenericData implements Cloneable { @Override public String toString() { XmlNamespaceDictionary namespaceDictionary = this.namespaceDictionary; if (namespaceDictionary == null) { namespaceDictionary = new XmlNamespaceDictionary(); } return namespaceDictionary.toStringOf(name, this); } }
GenericXml extends GenericData implements Cloneable { @Override public String toString() { XmlNamespaceDictionary namespaceDictionary = this.namespaceDictionary; if (namespaceDictionary == null) { namespaceDictionary = new XmlNamespaceDictionary(); } return namespaceDictionary.toStringOf(name, this); }  }
GenericXml extends GenericData implements Cloneable { @Override public String toString() { XmlNamespaceDictionary namespaceDictionary = this.namespaceDictionary; if (namespaceDictionary == null) { namespaceDictionary = new XmlNamespaceDictionary(); } return namespaceDictionary.toStringOf(name, this); }  @Override GenericXml clone(); @Override String toString(); @Override GenericXml set(String fieldName, Object value); }
GenericXml extends GenericData implements Cloneable { @Override public String toString() { XmlNamespaceDictionary namespaceDictionary = this.namespaceDictionary; if (namespaceDictionary == null) { namespaceDictionary = new XmlNamespaceDictionary(); } return namespaceDictionary.toStringOf(name, this); }  @Override GenericXml clone(); @Override String toString(); @Override GenericXml set(String fieldName, Object value); public String name; public XmlNamespaceDictionary namespaceDictionary; }