方法知道,就是不知道id在如何写在形参列表中。比如下图为寻找的元素和属性。需要定位到Student id=‘2’ 得到该元素的节点。方法为:Node node = document.selectSingleNode("XYZ");Element element = (Element) node;上面代码中的形参列表中的XYZ我不知道该怎么填写,谁知道吗?能指导一下书写方式吗?
element.attributeValue(“id”)