/// Writes out this element as the root element in a new XML document using the provided configuration
Writes out this element as the root element in a new XML document using the provided configuration
Writes out this element as the root element in a new XML document using the provided configuration
pub fn write_with_config<W: Write>(&self, w: W, config: EmitterConfig) -> Result<(), Error> {
        use xml::common::XmlVersion;
        use xml::writer::events::XmlEvent;
        use xml::writer::EventWriter;
        let write_document_declaration = config.write_document_declaration;
        let mut emitter = EventWriter::new_with_config(w, config);
        if write_document_declaration {
            emitter.write(XmlEvent::StartDocument {
                version: XmlVersion::Version10,
                encoding: None,
                standalone: None,
            })?;
        }
        self._write(&mut emitter)
    }
pub fn write_with_config < W : Write > ( & self , w : W , config : EmitterConfig ) -> Result < ( ) , Error > { use xml :: common :: XmlVersion ; use xml :: writer :: events :: XmlEvent ; use xml :: writer :: EventWriter ; let write_document_declaration = config . write_document_declaration ; let mut emitter = EventWriter :: new_with_config ( w , config ) ; if write_document_declaration { emitter . write ( XmlEvent :: StartDocument { version : XmlVersion :: Version10 , encoding : None , standalone : None , } ) ? ; } self . _write ( & mut emitter ) }
Writes out this element as the root element in a new XML document using the provided configuration
Writes out this element as the root element in a new XML document using the provided configuration
&self
w
W
config
EmitterConfig