Re: [xml] Hi, two questions



On Mon, Jan 02, 2006 at 03:25:19PM +0000, chinlu chinawa wrote:
Hi,

I'm using libxml2 for parsing a file. Whether my file
is like this:

<node>
  some text
</node>

<node>some text</node>

How can I do if I want to get node's contents without
carriage returns? I've been trying with

  You need to modify the XML input. There is no way the
XML parser is gonna remove content in text nodes even if
they are \n.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 2811)]
0xb7df95de in _IO_vfprintf (s=0xb7eb0180,
format=0x8049766 "    Image: %s\n", ap=0xbffff9cc)
    at vfprintf.c:1528
1528    vfprintf.c: Not such file or directory
        in vfprintf.c

In my traverse I've got:

  if(data->image)
    printf("image: %s\n", data->image);

  data is not a libxml2 structure. There is no way I can guess
why your pointer is corrupted or NULL.

Kind Regards, and happy new year.

  Thanks, you too !

Daniel

-- 
Daniel Veillard      | Red Hat http://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]