使用xpath取得属性的值

2025-03-22 13:20:50
推荐回答(1个)
回答1:

Element root = document.getRootElement();
Element node = root.selectSingleNode("/chart/dials/dial[tt='92']");
String value = node.getAttributeValue("tt");