我有几个要处理的 xml 文件。示例文件如下
<DOC>
<DOCNO>2431.eng</DOCNO>
<TITLE>The Hot Springs of Baños del Inca near Cajamarca</TITLE>
<DESCRIPTION>view of several pools with steaming water; people, houses and
trees behind it, and a mountain range in the distant background;</DESCRIPTION>
<NOTES>Until 1532 the place was called Pulltumarca, before it was renamed to
"Baños del Inca" (baths of the Inka) with the arrival of the Spaniards .
Today, Baños del Inca is the most-visited therapeutic bath of Peru.</NOTES>
<LOCATION>Cajamarca, Peru</LOCATION>
</DOC>
使用 xmlread() matlab 函数时,出现以下错误。
[Fatal Error] 2431.eng:3:29: Invalid byte 2 of 4-byte UTF-8 sequence.
??? Java exception occurred:
org.xml.sax.SAXParseException: Invalid byte 2 of 4-byte UTF-8 sequence.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
Error in ==> xmlread at 98
parseResult = p.parse(fileName);
有关如何解决此问题的任何建议?