GAEBParser¶
The main entry point for parsing GAEB files. Auto-detects version, format, and encoding.
GAEBParser
¶
Parse any GAEB file — auto-detects version and format.
Usage
doc = GAEBParser.parse("tender.X83") doc = GAEBParser.parse("old.D83") doc = GAEBParser.parse_bytes(raw, filename="tender.X83") doc = GAEBParser.parse_string(xml, filename="tender.X83")
parse
staticmethod
¶
parse(path, validation=LENIENT, xsd_dir=None, keep_xml=False, max_file_size=None, post_parse_hook=None, collect_raw_data=False, extra_validators=None, suppress=None)
Parse a GAEB file from disk and return a unified GAEBDocument.
Set keep_xml to True to retain raw lxml elements on every
model (item.source_element) and enable doc.xpath().
max_file_size overrides the configured max_file_size_mb
limit (in bytes). Pass 0 to disable the check.
post_parse_hook is called with (item, source_element) for
every parsed item — useful for extracting vendor-specific XML
elements into item.raw_data.
collect_raw_data when True automatically populates
item.raw_data with any XML child elements not consumed by
the built-in parser.
extra_validators are per-call validation functions appended after the built-in and globally-registered validators.
parse_bytes
staticmethod
¶
parse_bytes(data, filename='input.X83', validation=LENIENT, xsd_dir=None, keep_xml=False, max_file_size=None, post_parse_hook=None, collect_raw_data=False, extra_validators=None, suppress=None)
Parse GAEB data from bytes (useful for web uploads, S3 streams, etc.).
The filename hint is used for version/phase detection from the extension.
parse_string
staticmethod
¶
parse_string(xml_text, filename='input.X83', validation=LENIENT, xsd_dir=None, keep_xml=False, max_file_size=None, post_parse_hook=None, collect_raw_data=False, extra_validators=None, suppress=None)
Parse GAEB data from an XML string.
The filename hint is used for version/phase detection from the extension.