#[repr(C)]pub struct _xmlSaveCtxt {
pub buf: *mut _xmlOutputBuffer,
pub options: c_int,
pub format: c_int,
pub no_decl: c_int,
pub no_empty: c_int,
pub as_html: c_int,
pub indent: *mut xmlChar,
pub encoding: *mut xmlChar,
pub escape: Option<xmlCharEncodingOutputFunc>,
pub attrEscape: Option<xmlCharEncodingOutputFunc>,
}Expand description
Candidate-internal save context (opaque upstream).
Fields§
§buf: *mut _xmlOutputBufferThe output buffer the context serializes into.
options: c_intThe XML_SAVE_* option bitmask passed to xmlSaveTo*.
format: c_intWhether XML_SAVE_FORMAT (newlines + indentation) is enabled.
no_decl: c_intWhether the XML declaration is suppressed (XML_SAVE_NO_DECL).
no_empty: c_intWhether empty elements must be written with an explicit end tag
(XML_SAVE_NO_EMPTY).
as_html: c_intHTML output mode (nokogiri SaveOptions::AS_HTML = 64): empty HTML
void elements (br/img/…) serialise as <br> and other empty
non-void elements as <a></a>.
indent: *mut xmlCharOptional indentation string used when formatting is enabled.
encoding: *mut xmlCharThe encoding name carried into the XML declaration (upstream
ctxt->encoding, xmlStrdup’d at context creation, freed by
xmlSaveClose/xmlSaveFinish like upstream xmlFreeSaveCtxt).
NULL means “use the document’s own encoding” (upstream
if (encoding == NULL) encoding = cur->encoding;).
escape: Option<xmlCharEncodingOutputFunc>Character-escaping callback for text content (deprecated upstream).
attrEscape: Option<xmlCharEncodingOutputFunc>Character-escaping callback for attribute values (deprecated upstream).