document property

dynamic get document

Implementation

get document {
  //GET THE FILE AS A STRING
  String documentAsString = getFileAsString();
  //PARSE THE STRING TO A DOCUMENT
  _document = parse(documentAsString);
  if (_filePath == null || _filePath == "") {
    throw Exception("File path not set");
  } else {
    return _document;
  }
}