I am trying to parse an XML document using Tuscany C++ (current build).
The XMLHelper::loadFile() method is returning an XMLDocumentPtr and no
exceptions are thrown. However, a call to
XMLDocument::getRootDataObject() returns NULL.

This is the code that I am using.

cout << "START" << endl;
const char *filename = "input.xml";
XMLDocumentPtr doc = xmlHelper->loadFile( filename );
if (!doc) {
        cout << "FAILED TO PARSE" << endl;
}
DataObjectPtr root = doc->getRootDataObject();
if (!root) {
        cout << "NO ROOT OBJECT" << endl;
}
cout << "END" << endl;

This produces the output:

START
NO ROOT OBJECT
END

Any guidance would be much appreciated.

Thanks,

Andy.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to