Sorry the following is all very muddled but should get you started.
We use the "xerces" freeware XML parser from apache
We are using version 5 which is quite old now as they are on at least version 7 but 5 works just fine for us.
It is not a simple piece of software to use - it takes time and patience to get it working. Its not as simple to use as the MS DOM parser in VB according to my colleagues who use VB. The following is not a program or example but some code snippits to get you started with some of the things you can look up in the documentation. We actually wrapped the DOM parser to make it a bit easier to use. I can't give you the code as it is copyright to our company but I can give you some hints:
// Strangely these sax exceptions are needed if you want to instantiate an error handler
// for the DOM parser....
#include <sax/SAXException.hpp>
#include <sax/SAXParseException.hpp>
....
mParser = new DOMParser; // Have to new/delete as must call Terminate AFTER deletion
// setValidationScheme
// Indicates what validation scheme to use. It defaults to 'auto', but
// can be set via the -v= command.
// setDoNamespaces
// Indicates whether namespace processing should be done.
// setCreateEntityReferenceNodes
// Indicates whether entity reference nodes needs to be created or not
// Defaults to false
//
// mParser->setValidationScheme(DOMParser::Val_Always);
mParser->setValidationScheme(DOMParser::Val_Auto);
mParser->setDoNamespaces(false);
mParser->setCreateEntityReferenceNodes(false);
mParser->setToCreateXMLDeclTypeNode(true);
mParser->setIncludeIgnorableWhitespace(false);
mParser->setErrorHandler(&mErrorHandler);
...
#include <framework/MemBufInputSource.hpp>
void mlXmlDOMParser:

arse(const string &arXMLString)
{
parse(arXMLString.c_str());
}
void mlXmlDOMParser:

arse(const char *apXMLString)
{
// Parse the XML string passed in
try
{
// This is a xerces type
MemBufInputSource inXML((const XMLByte*)apXMLString,
strlen(apXMLString), "mlXmlDOMParser"

;
mParser->parse(inXML);
}
catch (const XMLException& e)
{
string lMsg = "mlXmlDOMParser:

arse : An XML error occured during XML parsing.";
lMsg += " Error was in file "; lMsg += e.getSrcFile();
lMsg += " line "; lMsg += e.getSrcLine();
lMsg += " error code "; lMsg += e.getCode();
lMsg += " message "; lMsg += *e.getMessage();
output lMsg somehow....
}
catch (const DOM_DOMException& e)
{
string lMsg = "mlXmlDOMParser:

arse : A DOM error occured during XML parsing with code ";
lMsg += e.code;
output lMsg somehow
}
catch (...)
{
string lMsg = "mlXmlDOMParser:

arse : An unknown error occured during XML parsing";
output lMsg somehow
}
// Now check that the parse was ok
if (mErrorHandler.getNumFatals() > 0)
{
throw error somehow... (mErrorHandler.getNumFatals() << " fatal errors encountered during parse of XML."
<< " Error list is as follows:\n" << mErrorHandler.getErrors());
}
// Check for any other warnings etc...
else if (mErrorHandler.getErrorCount() > 0)
{
log a warning somehow ("Errors from parse are \n" << mErrorHandler.getErrors());
}
// Check that the parse succeeded
if (GetTopNode().isNull())
{
throw error somehow ... ("Failed to generate document"

;
}
else if (GetTopNode().getFirstChild().isNull())
{
throw error somehow ... ("Document is blank"

;
}
}
...
then you can access the information using the DOM_Node type. Note that the first node is the document and you then go down into its children to get to the actual data.
Here are some other useful things that will save you headaches:
// This class is for internal use only by the DOM parser.
class mlXmlPlatformUtils
{
public:
mlXmlPlatformUtils();
~mlXmlPlatformUtils();
static bool Exists() { return msUsageCount > 0; }
private:
static int msUsageCount;
};
// *********************************************************************************
//
// PLATFORM UTILS CLASS WHICH ENSURES THAT THE PLATFORM SPECIFIC INITIALISATION FOR
// DOM HAS BEEN PERFORMED
//
// *********************************************************************************
// *********************************************************************************
//
// VITAL - This dummy instance is to ensure that XMLPlatformUtils are initialised
// before any DOM parsers and also it is Terminated after and DOM Parsers.
// ALSO ensures Terminate is only called once at the end of the program
//
// Later versions of xerces allow Initialise and Terminate to be called multiple
// times during the execution of a program. However even if this is allowed, it
// is wasteful so this dummy instance ensures it only ever gets called once.
//
// *********************************************************************************
static mlXmlPlatformUtils dummy;
// static usage count is used to determine when to really destroy and create the instance.
int mlXmlPlatformUtils::msUsageCount = 0;
//=============================================================================
//
// Method : mlXmlPlatformUtils::mlXmlPlatformUtils
//
// Description : Utility class to ensure only one instance of platform utils is created
//
//=============================================================================
mlXmlPlatformUtils::mlXmlPlatformUtils()
{
msUsageCount++;
if (msUsageCount == 1)
{
SM_LOG_MESSAGE(LOG_VERBOSE, "Creating mlXmlPlatformUtils. Count = " << msUsageCount);
XMLPlatformUtils::Initialize();
}
else if (msUsageCount <= 0)
{
throw error somehow ("Invalid usage count error in mlXmlPlatformUtils. Count = " << msUsageCount)
}
else
{
log a message ("NOT Creating mlXmlPlatformUtils. Count = " << msUsageCount);
}
}
//=============================================================================
//
// Method : mlXmlPlatformUtils::~mlXmlPlatformUtils
//
// Description : Utility class to ensure only one instance of platform utils is created
//
//=============================================================================
mlXmlPlatformUtils::~mlXmlPlatformUtils()
{
msUsageCount--;
if (msUsageCount == 0)
{
log the message ("Destroying mlXmlPlatformUtils. Count = " << msUsageCount);
XMLPlatformUtils::Terminate();
}
else
{
log the message ("NOT Destroying mlXmlPlatformUtils. Count = " << msUsageCount);
}
}
//=============================================================================
//
// Method : mlDOMErrorHandler::mlDOMErrorHandler
//
// Description : DOM error handler class to record errors during parsing
//
//=============================================================================
mlDOMErrorHandler::mlDOMErrorHandler() :
mNumWarnings(0), mNumErrors(0), mNumFatals(0)
{
}
//=============================================================================
//
// Method : mlDOMErrorHandler::~mlDOMErrorHandler
//
// Description : DOM Error handler class
//
//=============================================================================
mlDOMErrorHandler::~mlDOMErrorHandler()
{
}
//=============================================================================
//
// Method : mlDOMErrorHandler::CommonErrorHandler
//
// Description : Log the error in the internal buffer
//
//=============================================================================
void mlDOMErrorHandler::CommonErrorHandler(const SAXParseException& e, char *msg)
{
string lError(msg);
lError += " in File: ";
lError += mlXmlDOMTranscode(e.getSystemId()).asInternalCharPtr();
lError += " line: ";
lError += mlToString(e.getLineNumber());
lError += " char: ";
lError += mlToString(e.getColumnNumber());
lError += " Message: ";
lError += mlXmlDOMTranscode(e.getMessage()).asInternalCharPtr();
mErrors += lError;
mErrors += "\n";
}
//=============================================================================
//
// Method : void mlDOMErrorHandler::warning
//
// Description : Standard error handler interface for warnings
//
//=============================================================================
void mlDOMErrorHandler::warning(const SAXParseException& e)
{
mNumWarnings++;
CommonErrorHandler(e, "Warning"

;
}
//=============================================================================
//
// Method : mlDOMErrorHandler::error
//
// Description : Standard error handler interface for errors
//
//=============================================================================
void mlDOMErrorHandler::error(const SAXParseException& e)
{
mNumErrors++;
CommonErrorHandler(e, "Non-Fatal Error"

;
}
//=============================================================================
//
// Method : mlDOMErrorHandler::fatalError
//
// Description : Standard error handler interface for fatal errors
//
//=============================================================================
void mlDOMErrorHandler::fatalError(const SAXParseException& e)
{
mNumFatals++;
CommonErrorHandler(e, "Fatal Error"

;
}
//=============================================================================
//
// Method : mlDOMErrorHandler::resetErrors
//
// Description : Clear the internal error structures
//
//=============================================================================
void mlDOMErrorHandler::resetErrors()
{
mNumWarnings = 0;
mNumErrors = 0;
mNumFatals = 0;
mErrors = "";
}
Hope this helps....