Skip to main content

parse

Function parse 

Source
pub fn parse(xml: &str) -> Result<XmlModel, XmlError>
Expand description

Parse a GenICam XML document into an XmlModel.

The parser only understands a practical subset of the schema. Unknown tags are skipped which keeps the implementation forward compatible with richer documents.

Each node element is parsed in isolation: one declaration we cannot make sense of costs that single feature and is recorded in XmlModel::skipped, rather than failing the load and leaving the camera unopenable. Only errors that make the document as a whole unreadable are returned.