zuroyu
V2EX  ›  Java

dom4j xml 特殊字符问题求助

  •  
  •   zuroyu · May 12, 2011 · 5809 views
    This topic created in 5510 days ago, the information mentioned may be changed or developed.
    项目中使用dom4j来读取xml, xml中特殊字符该如何解决,例如字符 ‘&’ 。
    目前使用的SAXReader来读取
    SAXReader reader = new SAXReader();
    Document document = null;
    //获得document
    document = reader.read(file);
    这样的话如何把file中的特殊字符找出来替换?
    要求:不能更改XML数据
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3041 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 08:52 · PVG 16:52 · LAX 01:52 · JFK 04:52
    ♥ Do have faith in what you're doing.