Re: [xml] xmlReadMemory reading struct char pointer issue

Thanks for the pointers.
it was missing the null termination char - '\0' for ctxt->sdiResponse. After adding that this issue was resolved.
On 6/17/08, Ashwin <ashwins huawei com> wrote:

From: xml-bounces gnome org [mailto:xml-bounces gnome org] On Behalf Of Arthur Johnson
Sent: 2008
618 10:51
To: xml gnome org
Subject: Re: [xml] xmlReadMemory reading struct char pointer issue


>I changed the above xmlReadMemory call to the following line:


>doc = xmlRecoverMemory(ctxt->sdiResponse, strlen(ctxt->sdiResponse));

>It seems to load the XML but I get the following error:

You get NULL in with xmlReadMemory because the content being parsed is not well-formed, RecoverMemory tries to parse inspite of error.


>Entity: line 1: parser error : Extra content at the end of the document


This error happens if you have some content after the end of the root element, something like





<element2>-----àExtra content at end of document




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]