getElementValue method

String getElementValue({
  1. required XmlElement element,
  2. required String nodePath,
})

获取节点元素值 element XmlElement nodePath 节点路径 eg. root->node1->node2->node3

Implementation

String getElementValue({required XmlElement element, required String nodePath}) {
  var xmlElement = getElement(element: element, nodePath: nodePath);
  return xmlElement?.text ?? "";
}