getAttrValue method
获取属性值
element
XmlElement
nodePath
节点路径 eg. root->node1->node2->node3
attributeName
元素属性名
Implementation
String getAttrValue({required XmlElement element, required String nodePath, required String attributeName}) {
if (attributeName.isEmptyString) {
return "";
}
var xmlElement = getElement(element: element, nodePath: nodePath);
return xmlElement?.getAttribute(attributeName) ?? "";
}