Hi

 

I am trying to parse a XML document that looks like the following

 

<?xml version="1.0" encoding="UTF-8"?>

<D:multistatus xmlns:D="DAV:">

    <D:response>

    </D:response>

</D:multistatus>

 

my code looks like this

 

LoadDOMDocument(char *File)

{

    DOMParser Parser;

    QWErrorHandler* errorHandler = new QWErrorHandler();

    Parser.reset();

    Parser.setErrorHandler(errorHandler);

    Parser.setDoValidation(true);

    Parser.setDoNamespaces(true);

    Parser.setDoSchema(true);

//  Parser.setValidationSchemaFullChecking(true); 

    Parser.parse(File);//

 

 

I get an error like this from the parser

 

Attribute '{http://www.w3.org/2000/xmlns/}D' is not declared for element 'D:multistatus'

 

I want to use XPath (Xalan) on the XML, if I set doValidation(false) then it loads fine, but what causes the error??

 

Please any help is very welcome

 

 

Regards

 

Troels Rossing

 

www.Qualiware.com

 

Reply via email to