Skip to main content

zerodds_xml_wire/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 ZeroDDS Contributors
3//! DDS-XML 1.0 wire PSM (`formal/2019-09-01` §6) — XML as the
4//! wire format for DDS topic data.
5//!
6//! Crate `zerodds-xml-wire`. Safety classification: **STANDARD**.
7//!
8//! Spec §6 specifies XML as an alternative wire representation for
9//! topic samples (parallel to CDR). We provide:
10//!
11//! * [`codec`] — bidirectional XML↔CDR codec at the type-token level.
12//! * [`xsd`] — XSD schema generation from IDL type definitions.
13//! * [`parser`] — streaming XML parser (no DOM buffering).
14//! * [`emitter`] — streaming XML emitter with XML 1.0 conformance.
15//! * [`validator`] — schema validation against XSD.
16
17#![no_std]
18#![forbid(unsafe_code)]
19#![warn(missing_docs)]
20
21extern crate alloc;
22
23#[cfg(feature = "std")]
24extern crate std;
25
26pub mod codec;
27pub mod emitter;
28pub mod parser;
29pub mod validator;
30pub mod xsd;
31
32pub use codec::{CodecError, FieldKind, FieldValue, decode_xml, encode_to_xml};
33pub use emitter::{EmitError, XmlEmitter};
34pub use parser::{Event, ParseError, XmlParser};
35pub use validator::{ValidationError, validate};
36pub use xsd::{XsdGenerator, XsdType};