read_archived_xml#
- read_archived_xml(archive_path: str | CloudPath | Path, regex: str | None = None, file_list: list | None = None, **kwargs) _Element [source]#
Read archived XML from
zip
ortar
archives.You can use this site to build your regex.
- Parameters:
- Returns:
XML file
- Return type:
etree._Element
Example
>>> arch_path = 'D:/path/to/zip.zip' >>> file_regex = '.*dir.*file_name' # Use .* for any character >>> read_archived_xml(arch_path, file_regex) <Element LANDSAT_METADATA_FILE at 0x1c90007f8c8>