指定されたxpath内の指定された属性の値を返すことができるメソッドが必要です。したがって、たとえば、xpathのタグ内にxpath = /root/foo/body/part[5]/test[3]
属性の値が必要な場合は、次のようなメソッドを呼び出すことができる必要があります。id
test[3]
public String getAttributeValue(String xpath, String attribute) {
String attributeValue = "xpath/attribute".value();
return attributeValue;
}