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.
我需要对 dom4j 文档设置查询,就像 Node fromTag = document.selectSingleNode("//*:from"); 在选择查询中没有前缀一样。我怎样才能做到这一点?
Node fromTag = document.selectSingleNode("//*:from");
DOM4J 仅支持 XPath 1.0,但您可以改用此表达式:
document.selectSingleNode("//*[local-name()='from']");