1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! SBE XML → token [`Ir`](crate::Ir).
//!
//! | Function | Use when |
//! |----------|----------|
//! | [`parse`] | Schema already in a string |
//! | [`parse_file`] | Path on disk; resolves `xi:include` relative to the file |
//! | [`parse_with_xsd_validation`] | Same as [`parse`], after structural XSD check |
//!
//! After parse, wrap with [`crate::Schema::from_ir`] and pass to
//! [`crate::Generator`].
//!
//! ```rust
//! use ergo_sbe::{parse, Schema};
//! let ir = parse(r#"<?xml version="1.0"?>
//! <messageSchema package="t" id="1" version="0" byteOrder="littleEndian">
//! <types>
//! <composite name="messageHeader">
//! <type name="blockLength" primitiveType="uint16"/>
//! <type name="templateId" primitiveType="uint16"/>
//! <type name="schemaId" primitiveType="uint16"/>
//! <type name="version" primitiveType="uint16"/>
//! </composite>
//! </types>
//! </messageSchema>"#).unwrap();
//! let schema = Schema::from_ir(ir);
//! assert_eq!(schema.id, 1);
//! ```
//!
//! Errors are span-bearing [`ParseError`]s ([`miette`]).
pub use ;
pub use ;
pub use ;
// Test-visible re-exports of parse internals (xml is already #[doc(hidden)]).
pub use ;
pub use ;