The current implementation of the ItemProvider incorrectly handles items that contain escaped XML sequences. This causes the toXML method to return invalid XML content. Subsequently, the validation of the returned XML may fail.
E.g., when receiving an item that looks like the following
the toXML() method returns
which is wrong.
It seems that the problem is in the ItemProvider class, which parses the received content using the XML pull parser and reassembles the XML in a StringBuffer.
else if (parser.getEventType() == XmlPullParser.TEXT)
The parser.getText() fetches the text content of the mywrapper element and transforms the escape sequences. However, the content is not properly escaped again when added to the StringBuffer.