TextNode.fromXML constructor

TextNode.fromXML(
  1. String xmlSTR
)

Implementation

factory TextNode.fromXML(String xmlSTR) {
  final document = XmlDocument.parse(xmlSTR);
  String str = document.firstChild?.text ?? "";
  return TextNode(value: str);
}