[xml] Memory Access Violation on xmlDocDump



I'm having a bit of a problem with xmlDocDump.  I'm trying to just dump the document after parsing it.  I keep getting the error:

Unhandled exception at 0x7c918fea in XMLTest.exe: 0xC0000005: Access violation writing location 0x00000010.

I am trying this under Windows, statically linking against the libraries.  Any ideas what I'm doing wrong?

#include <libxml/parser.h>

#include <iostream>
#include <fstream>
#include <stdio.h>

int main(int argc, char* argv[])
{
    xmlDoc * doc;

    doc = xmlParseFile("C:\\x1.xml");
    
    if(!doc)
    {
        std::cerr << "doc = NULL" << std::endl;
    }
    xmlDocDump(stdout, doc);
}

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