getRootElement method

XmlElement? getRootElement({
  1. required String xml,
})

获取xml节点 xml xml内容 nodePath 节点路径 eg. root->node1->node2->node3

Implementation

XmlElement? getRootElement({required String xml}) {
  XmlDocument? document = _getDocument(xml);
  if (document == null) {
    return null;
  }
  return document.root;
}