| 90 | return text |
| 91 | |
| 92 | class XMLReader(Reader): |
| 93 | def parse(self, file_path: Path) -> str: |
| 94 | logger.info(f"Reading XML file from {file_path}.") |
| 95 | with open(file_path, "r") as f: |
| 96 | data = BeautifulSoup(f, "xml") |
| 97 | text = data.get_text() |
| 98 | return text |
| 99 | |
| 100 | class YAMLReader(Reader): |
| 101 | def parse(self, file_path: Path, return_str=True) -> Union[str, Any]: |