You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Awasthi, Anand" <An...@bmc.com> on 2001/06/11 21:28:22 UTC
getting ACCESS VIOLATION while parsing xml string !!
Hi,
I am trying to wrap the serces api in my code and then parse and XML string
using following declaration and definitions:
a.h
struct Xml_DOM_Parser_Impl;
class Xml_DOMParser
{
private:
Xml_DOM_Parser_Impl* pdomparserimpl;
public:
void parse(const char * xmlfile);
};
----------------------------------------------------------------------
a.cpp
#include <xercesdom.h> // headers of xerces apis
#include "a.h"
struct Xml_DOM_Parser_Impl
{
DOMParser _domparser;
};
Xml_DOMParser::parse(const char * file1)
{
impl->_domparser.parse(MemBufInputSource
( (const XMLByte*)file1
, strlen(file1)
, ""
, false
));
}
now when i run the following code :
Xml_DOMParser * xmlparser = new Xml_DOMParser;
xmlparser->parse(xmlfile);
i get ACCESS VIOLATION at following code :
xmlparser->parse(xmlfile);
which actually points me to following code :
impl->_domparser.parse(MemBufInputSource
( (const XMLByte*)xmlfile
, strlen(xmlfile)
, ""
, false));
what is the wrong thing i am doing in above code ??
pls enlighten me.
thanks
Anand
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org