[xml] Debugging memory allocation failures...



Hello
So I'm playing around a little with libxml and Apache modules. I have a program that I tested out and now I'm playing with it through Apache modules. It doesn't quite work. I've done a little debugging by printing where I was and some of the elements... Here's what I've done:

I have a generic apache module template created from apxs. It prints out a string. or multiple strings. At first what I tried was taking my program and calling it from the apache handler function. Partially worked. I wanted to use the xmlDocDumpMemory() to get a handle on the assembled xml. I always get a null for the xmlChar **out_buffer. So I thought perhaps it had something to do with memory allocation of libxml conflicting with memory allocation of apache or apr or whatever. but when I do the first parse of xmlReadMemory() the doc isn't null. and I can use a modified version of print_element_names() to print out to the browser the xml element names and attributes etc...

So how come I can use libxml from my module, but xmlDocDumpMemory fails? How can I tell why it failed? Ideas etc...?

--
Nathanael D. Noblet
Gnat Solutions
204 - 131 Gorge Road E
Victoria, BC V9A 1L1

T/F 250.385.4613

http://www.gnat.ca/




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