Re: [xml] xmlReadMemory limitation

On Fri, Mar 11, 2005 at 10:31:03AM +0100, Espen Ekeroth wrote:
Could it be my use of the function: It looks like this:
    doc = xmlReadMemory(a_node->content, 400000, "noname.xml", NULL, 0);
The reason for using it like this is that the xml is recevied through the 
csoap library from a JBoss webservice.

I have tried to do it useing "sizeof(a_node->content)" but for some reason 
I only get 4 as the size (looks like the size of the adress.  [I have also 
tried to get the content first using the xmlNodeGetContent() function, but 
the result was the same]

you must pass the length of the string buffer. You know that a_node->content
is an UTF-8 string so you can use strlen() to extract the size and pass it
  doc = xmlReadMemory(a_node->content, strlen(a_node->content),
                      "noname.xml", NULL, 0);


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