有人可以解释我如何使用commons digest解析带连字符的xml标签。我一直在网上搜索但没有运气帮我解决这个问题
<foo id="1">...
<bar>
<foo-ref id="1"/>
</bar>
</foo>
答案 0 :(得分:0)
这个怎么样?
digester.addObjectCreate("foo-ref", "mypackage.FooRef");
http://commons.apache.org/proper/commons-digester/guide/core.html#doc.Usage