我试图解析一个XML文件,其中包含一些特殊字符,如"&"使用DOM解析器.我得到saxparse异常"对实体的引用必须以aa分隔符结束".有没有办法克服这个异常,因为我无法修改XML文件来删除特殊字符,因为它来自不同的应用程序.请建议一种解析此XML文件以获取根元素的方法?
提前致谢
这是我正在解析的XML部分
<P>EDTA/THAM WASH
</P>
<P>jhc ^ 72. METER SOLVENT: Meter 21 LITERS of R. O. WATER through the add line into
FT-250. Start agitator.
</P>
<P>R. O. WATER <ZLl LITERS </P>
<P>• NOTE: The following is a tool control operation. The area within 10 feet of any open vessel or container is under tool control. </P>
<P>-af . 73. CHARGE SOLIDS: Remove any unnecessary items from the tool controlled area. Indicate the numbers of each item that will …Run Code Online (Sandbox Code Playgroud)