pub fn parse_sample(
xml: &str,
type_def: &TypeDef,
type_lib: &[TypeLibrary],
) -> Result<SampleValue, XmlError>Expand description
Parses a concrete <sample> element against a type definition.
xml may be either a <sample> root element or the root
element of the data type directly (Spec §7.3.7.4 allows both
representations).
§Errors
XmlError::InvalidXml— XML not well-formed.XmlError::UnresolvedReference— referenced type not found intype_lib.XmlError::ValueOutOfRange— primitive value out of range.XmlError::MissingRequiredElement— a required member is missing.