Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在阅读WSO2 4.5.0中的.txt
<parameter name="transport.vfs.ContentType">text/plain; charset=windows-1252</parameter>
包含“&”字符。
在我将消息转换为 XML 后,&字符变成了&,我怎样才能通过文件并将所有现有的替换&回&?
&
&
使用您首选的 XML 库打开 XML 文件。
使用库的 API 访问文本节点的属性值或文本值(取决于数据出现的位置)。
在 XML 文件中更改&为&将使 XML 无效并导致解析拒绝它。(因为&这就是您&在 XML 中表达的方式)。