asXmlDocument property

XmlDocument? get asXmlDocument

Convert String to XmlDocument

Implementation

xml.XmlDocument? get asXmlDocument {
  try {
    return xml.XmlDocument.parse(this);
  } on xml.XmlParserException catch (e) {
    if (kDebugMode) {
      print('XmlParserException: ${e.message}');
    }
    return null;
  }
}