Schema support and document serialization
[0.2.13] 2020-16-01
Thanks to @jangernert for the upgrades to Document
serialization.
Thanks to @lweberk for contributing the Schema
featureset and to @cbarber for refining the FFI interop.
Added
Document::to_string_with_options
allowing to customize document serializationDocument::SaveOptions
containing the currently supported serialization options, as provided internally by libxmlSchema
holding and managingxmlSchemaPtr
as created while parsing bySchemaParserContext
SchemaParserContext
holding source of XSD and parsing into aSchema
while gathering and –in case returning– errors that arise from the XSD parser across the FFI to libxmlSchemaValidationContext
holding theSchema
from resultingSchemaParserContext
parse and offering validation methods forDocument
,Node
or file path to XML, while gathering and –in case returning– validation errors from the XML validator across the FFI to libxml
Changed
- the
Document::to_string()
serialization method is now implemented throughfmt::Display
and no longer takes an optional boolean flag. The default behavior is now unformatted serialization - previouslyto_string(false)
, whileto_string(true)
can be realized via
.to_string_with_options(SaveOptions { format: true, ..SaveOptions::default()})`