Hi,

  Is by any chance the XML declaration not at the very first character
in the string?  If that is the case, then it is not an XML
declaration, and indeed, it is not a valid processing instruction
either (so yes, that means that technically, the service does return
ill-formed XML).

  If that's the case, I see 2 obvious solutions: fix the service if
possible, or fix the content it returns (e.g. by removing any
whitespace characters at the beginning of the string before parsing
it).

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/


On 3 June 2015 at 16:15, Raghu wrote:
> Hi All,
>
>    I'm doing an xdmp:unquote of a string(xml), which is a http response from
> an other service. As it has xml processing instruction at the beginning, it
> is throwing a xdmp:badpiname error, while trying to unquote it. My logic
> requires it to be xml string. I need to omit the xml declaration. What is
> the best way to handle this?  I tried repair-full option, it works, but it
> is MODIFYING the xml content, which I DO NOT want to happen.
>
> Thanks!
> Raghu
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to