我用javax.xml.parsers.DocumentBuilderFactory解析XML文件,并用schema进行文件格式验证。
大部分文件解析没有问题,但是当被读取的XML文件路径含有中文字符的时候,就抛出SAXException:schema_reference.4: Failed to read schema document 'my_schema_path\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>.请问各位有什么建议吗?谢谢!
大部分文件解析没有问题,但是当被读取的XML文件路径含有中文字符的时候,就抛出SAXException:schema_reference.4: Failed to read schema document 'my_schema_path\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>.请问各位有什么建议吗?谢谢!
没看出来是XML文件中文名的问题
XML文件是'C:\myxml.xsd'谢谢!