Re: [xml] xmlDocDump will lost some part

I use xmlReadMemory now, it's ok.Thanks.

2008/3/27, Daniel Veillard <veillard redhat com>:
On Thu, Mar 27, 2008 at 12:02:02PM +0800, 高攀 wrote:
> Hi everybody!
> I'm a newbie of libxml2.I meet a strange problem.I post them below as html
> format,and I attach the project to save the time of yours.

Read the doc !

>      if((1 != xmlTextReaderRead(reader))
>         || !(doc = xmlTextReaderCurrentDoc(reader)))
>      {
>           printf("create doc failed\n");
>           exit(0);
>      }
>      xmlDocDump(stdout,doc);

  You completely misunderstood. The reader is a streaming API it
does NOT load the full document at once. your doc is a truncated part of
the full document, so what you get by printing it is an unspecified


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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