//parse it
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder;
Document doc;
ErrorHandler errHandler = new QpidLog4JSaxErrorHandler();
try
{
docFactory.setValidating(true);
docBuilder = docFactory.newDocumentBuilder();
docBuilder.setErrorHandler(errHandler);