Struct xmlsafe::AttWriter [−][src]
pub struct AttWriter<'a>(_);
Expand description
An XML attribute writer returned by XmlWriter::open_start_tag
.
Implementations
pub fn write_attr(
&mut self,
name: impl NameSafe,
value: impl AttValueSafe
) -> Result<(), Error>
pub fn write_attr(
&mut self,
name: impl NameSafe,
value: impl AttValueSafe
) -> Result<(), Error>
Writes an attribute. Avoid writing two attributes with the same name or your XML will be invalid.
Writes the given attribute and returns the Writer to allow method chaining. Avoid writing two attributes with the same name or your XML will be invalid.
Consumes the writer, writes a key and returns an AttValueWriter
.
Closes the opening tag, returning an XmlWriter you can use to write the element content. To produce a valid XML document you will need to close the tag after the content.
Closes the element with a self-closing tag. Returns the XmlWriter so you can continue writing the document.