用org.w3c.dom解析XML文件,
factory.setNamespaceAware(true);
factory.setValidating(true);
factory.setAttribute(SCHEMA_LANGUAGE, XML_SCHEMA);
factory.setAttribute(SCHEMA_SOURCE, strSchema);

builder = factory.newDocumentBuilder();
builder.setErrorHandler(new SchemaErrorHandler());
doc = builder.parse(new File(strFilePathName));
在大部分机器上运行都没有问题,只有两台XP的机器发生如下SAXException:
'......user_schema.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.请教各位大虾,有什么建议吗?谢谢!