I tried to use the following code:

SAXReader xmlReader = new SAXReader();
xmlReader.setValidation(true);

xmlReader.setFeature(
"http://apache.org/xml/features/validation/schema";, true);
xmlReader
.setProperty(
"http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation
",
"." + File.separator + "config.xsd");
XMLErrorHandler errorHandler = new XMLErrorHandler();
xmlReader.setErrorHandler(errorHandler);
configuration = xmlReader.read(f);


The last line "xmlReader.read(f)" just don't return when I try to read non
xml-formatted files. This files are supposed to be invalid, but it should
return any type of error instead of just freezing. Any help will be
appreciated.

Kind Regards,
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to