为什么没有解析出来isbn的属性lang?
用elementNode的getAttributes()取
在递归循环前面加了一行
if (n.hasAttributes()) { NamedNodeMap as = n.getAttributes(); for (int i = 0; i < as.getLength(); i++) { printNode(as.item(i), indent + 1); } }
就可以显示了
Sign in to make a reply
shadowTy
为什么没有解析出来isbn的属性lang?