MCPcopy
hub / github.com/pandas-dev/pandas / _parse_doc

Method _parse_doc

pandas/io/xml.py:522–541  ·  view source on GitHub ↗
(
        self, raw_doc: FilePath | ReadBuffer[bytes] | ReadBuffer[str]
    )

Source from the content-addressed store, hash-verified

520 )
521
522 def _parse_doc(
523 self, raw_doc: FilePath | ReadBuffer[bytes] | ReadBuffer[str]
524 ) -> Element:
525 from xml.etree.ElementTree import (
526 XMLParser,
527 parse,
528 )
529
530 handle_data = get_data_from_filepath(
531 filepath_or_buffer=raw_doc,
532 encoding=self.encoding,
533 compression=self.compression,
534 storage_options=self.storage_options,
535 )
536
537 with handle_data as xml_data:
538 curr_parser = XMLParser(encoding=self.encoding)
539 document = parse(xml_data, parser=curr_parser)
540
541 return document.getroot()
542
543
544class _LxmlFrameParser(_XMLFrameParser):

Callers 1

parse_dataMethod · 0.95

Calls 2

get_data_from_filepathFunction · 0.85
parseFunction · 0.85

Tested by

no test coverage detected