Re: [xml] xmlDocDump() on Windows



Sorry but I must reject this notion.  You're trying to say that it's broken the way I'm using it, but just on Windows?  Because like I said on Linux it runs fine.

I'm trying to do something EXTREMELY simple here.  See below.  In my experience if xmlReadFile fails I get a bunch of things to stderr about why and my program then exists.  

And I have also verified with a debugger that mtp3 is indeed a valid pointer.  So if mtp3 is a valid and parsed and my FILE*xml is also a valid pointer,  xmlDocDump would have no reason to fail.

I have attached some screenshots highlighting the failure.

/* Begin code snippet */
xmlDocPtr mtp3;
FILE *xml;

mtp3 = xmlReadFile(config->MTP3filename, NULL, 0);
xml = fopen(config->MTP3filename, FOPEN_MODE_OVERWRITE);
if (!xml || ferror(xml))
{
outputf("ERROR WRITING MTP3 XML File: %s\n", strerror(errno));
}
else
{
xmlDocDump(xml, mtp3);
fclose(xml);
}

On 9/13/07, Rob Richards < rrichards ctindustries net> wrote:
Daniel Corbe wrote:
> Hi,
>
> As of 2.6.30 this issue doesn't seem to be resolved and going back in
> the mailing list archives others have brought it up with no success.
>
>
> On windows only (code has been tested under Linux and Mac OS X as
> well) xmlDocDump() and family crashes.
>
> Is there an alternative I can use in the Tree API to write the file to
> disk or a memory segment (so I can write it to disk myself?)
>
> Can anyone confirm this?  Is this a known issue?  Is there a work-around?
What issue in particular are you referring to? xmlDocDump() and the rest
all work perfectly fine on windows, so it's more likely something with
your usage causing the crash.

Rob

 

Attachment: Picture 5.png
Description: PNG image

Attachment: Picture 7.png
Description: PNG image



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