BlockData.fromXML constructor
BlockData.fromXML(
- String xmlSTR
Implementation
factory BlockData.fromXML(String xmlSTR) {
final document = XmlDocument.parse(xmlSTR);
String value = (document.firstChild?.text ?? "").replaceAll("<", "<");
String blockID = document.firstChild!
.attributes
.firstWhere((element) => element.name.toString() == "blockID")
.value;
return BlockData(blockID: blockID, value: value);
}