Skip to main content

Crate openbim_gaeb

Crate openbim_gaeb 

Source
Expand description

Pure-Rust, lossless tools for GAEB DA XML.

openbim-gaeb recognizes GAEB by content, cross-checks namespace/header/DP evidence, extracts common bill-of-quantities item views, and preserves the complete source document. Unknown XML remains byte-identical. Supported edits splice only the requested field and then reparse atomically.

§Boundary

XML mechanics use quick-xml directly. BOM handling, content detection, streaming element interpretation, GAEB exchange phases, BoQ semantics, diagnostics, and editing remain here because they are GAEB policy rather than generic XML behavior.

§Example

use openbim_gaeb::{Document, ExchangePhase, GaebVersion};

let xml = br#"<GAEB xmlns="http://www.gaeb.de/GAEB_DA_XML/DA83/3.3">
  <GAEBInfo><Version>3.3</Version><VersDate>2023-01</VersDate></GAEBInfo>
  <Award><DP>83</DP></Award>
</GAEB>"#;
let document = Document::parse(xml)?;
assert_eq!(document.metadata().version, Some(GaebVersion::V3_3));
assert_eq!(document.metadata().phase, Some(ExchangePhase::X83));
assert_eq!(document.as_bytes(), xml);

§Capability limits

This is not an XSD validator and does not claim complete typed bindings for every phase. Item is a common read model; unsupported GAEB content remains accessible and preserved through Document::as_bytes.

Structs§

CategoryRef
One bill-of-quantities category containing an item.
Diagnostic
A non-fatal inconsistency or unsupported declaration discovered while reading.
Document
An owned GAEB document with lossless source bytes and extracted domain views.
Item
A format-stable summary of a GAEB <Item>.
Metadata
Evidence and generator information extracted from a GAEB document.

Enums§

DiagnosticKind
Stable categories callers can use without parsing diagnostic prose.
Error
Errors that prevent a document or edit from being represented safely.
ExchangePhase
A standardized GAEB exchange phase (DP).
GaebVersion
A GAEB DA XML schema generation.