I have a string object that contains XML (including body and metadata). When I try to parse it I get the following error:
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog
I tried to use My_XML.getBody()
function but it didn't help.
I need some help with how to edit my XML so it will be allowed.
Example XML
{"body": <<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TccSubscriptionData xmlns="tcc.generated.com">
<MessageKey>
<MessageKey>12</MessageKey>
<Receiver>asd</Receiver>
<Timestamp>2018-06-20T14:33:22.968+02:00</Timestamp>
<ResponseType>sdf</ResponseType>
<CorrelationId>0</CorrelationId>
</MessageKey>
</TccSubscriptionData>
, "metadata": {"field1": "aaa", "field2": 123, "field3": aaa, "field4": "aaa", "field5": 123, "field6": {"field7":"aaa","field8":"a12d","field9":"aaa"}}}