PrintDocumentResult.fromXML constructor

PrintDocumentResult.fromXML(
  1. String xmlSTR
)

Implementation

factory PrintDocumentResult.fromXML(String xmlSTR) {
  final document = XmlDocument.parse(xmlSTR);

  String result = document.rootElement.attributes
      .firstWhere((p0) => p0.name.toString() == "result")
      .value;
  String documentID = document.rootElement.attributes
      .firstWhere((p0) => p0.name.toString() == "documentID")
      .value;
  return PrintDocumentResult(result: result, documentID: documentID);
}