Re: [xml] xmlParseMemory returns 0



On Tue, Sep 03, 2002 at 10:07:15PM -0600, Martin Glass wrote:
Hi all,
  I have compiled libxml2 (2.4.24) under Windows, and am successfully
parsing all my stuff, with one exception -- xmlParseMemory always returns
null when the content of a tag ends in "??".  I checked it with xmllint, and
it didn't complain...
  Is there something I've forgotten to do?  This just seems a little strange
to me.

  I can't reproduce it here !

paphio:~/XML -> cat tst.c
#include <libxml/tree.h>
#include <libxml/parser.h>

const char * input = "<?xml version=\"1.0\"?><BADTAG>Is this considered invalid XML ??</BADTAG>";

void main ()                                                                    {
    xmlDocPtr doc;
    int size = strlen(input);
    printf("size: %d\n", size);
    doc = xmlParseMemory(input, size);
    printf("doc: %p\n", doc);
}
paphio:~/XML -> ./tst
size: 71
doc: 0x80ae190
paphio:~/XML -> 

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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