Expand description
This module contains the XmlValue
type, which is a type which can be serialized or deserialized as XML, and a type which other types can deserialize from/serialize into.
It also contains subtypes to XmlValue
including XmlText
, XmlElement
, and XmlAttribute
, which can be used to deserialize from/serialize into specific types of XML data.
This is very useful in cases where you have arbitrary XML data, and you want to deserialize it into a type which can be used in your application, but you don’t know what the type is ahead of time and want to be able to handle it generically.
The types in this module can be constructed using the crate::xml!
macro.
Structs§
- XmlAttribute
- An XML attribute.
- XmlC
Data - CDATA section.
- XmlComment
- XML Comment
- XmlDecl
- Represents an XML declaration.
- XmlDoctype
- A doctype declaration.
- XmlElement
- An XML element.
- XmlProcessing
Instruction - A processing instruction.
- XmlSeq
- A sequence of XML elements.
- XmlText
- A text node in an XML document.
Enums§
- XmlChild
- An XML child node.
- XmlValue
- A value that can be serialized or deserialized as XML, and a type which other types can deserialize from/serialize into.
- XmlValue
Deserializer Error - Error type for deserializing XML values.
- XmlValue
Serializer Error - Error type for serializing XML values.
Functions§
- from_
value - Creates any
T
implementing [Deserialize
] from anXmlValue
- to_
value - Creates an
XmlValue
from anyT
implementing [Serialize
].