0

In android, when writing some values containing '&' in the text part, FastXmlSerializer.attribute() or Xml.newSerializer().attribute(), method encodes '&' as '&amp ;'. Is there any other Xml serializer or the property that must be set to write '&' as it is in xml data?

Thanks in advance.

Garry
  • 31
  • 5

1 Answers1

1

& in XML must always be escaped as &, otherwise the XML will be invalid. Do you really want to write invalid XML?

Michael Kay
  • 156,231
  • 11
  • 92
  • 164