Re: [xml] Hi, two questions

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

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

  some text

<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:

    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 Veillard      | Red Hat
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]