Skip to Content

Mapping error:Content is not allowed in prolog.

Hi All,

I am trying to read XML through groovy script , while reading XML getting error:

Content is not allowed in prolog.

Any idea how to resolve this error.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 06, 2017 at 12:55 PM

    Hi Aditya

    Check that you don't have e.g. whitespace before the XML prolog (i.e. the <?xml ... ?> bit). Also, there might be an issue with the UTF-8 Byte Order Mark (BOM). You might - for testing purposes - want to place a Content Modifier step immediately before your script step, in order to set an XML body that you know to be correct.

    If you are able to show the code and the payload, that would be helpful as well.

    Regards,

    Morten

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Morten,

      Thanks For Reply, Now issue is resolved . Actually I was storing XML in property and that property i was using in Custom Function.

      While defining property i didn't gave Data Type, After giving data type in property as java.lang.String it is working.

      Regards,

      Aditya