Struct xml_builder::XMLBuilder
source · pub struct XMLBuilder { /* private fields */ }
Expand description
Builder structure used to generate a custom XML structure.
Implementations§
source§impl XMLBuilder
impl XMLBuilder
sourcepub fn version(self, version: XMLVersion) -> Self
pub fn version(self, version: XMLVersion) -> Self
Sets the XML version attribute field.
Arguments
version
- An enum value representing the new version to use for the XML.
sourcepub fn encoding(self, encoding: String) -> Self
pub fn encoding(self, encoding: String) -> Self
Sets the XML encoding attribute field.
Arguments
encoding
- A String representing the encoding to use for the document.
sourcepub fn standalone(self, standalone: Option<bool>) -> Self
pub fn standalone(self, standalone: Option<bool>) -> Self
Sets the standalone attribute for this XML document.
sourcepub fn sort_attributes(self, sort: bool) -> Self
pub fn sort_attributes(self, sort: bool) -> Self
Enables attributes sorting.