Skip to main content

xml_to_json_from_bufread

Function xml_to_json_from_bufread 

Source
pub fn xml_to_json_from_bufread<R: BufRead, W: Write>(
    reader: R,
    out: W,
) -> Result<(), XmlToJsonError>
Expand description

Convert XML to JSON from a buffered reader.

Use this instead of xml_to_json when the input is already buffered (e.g. a BufReader you manage yourself) to avoid double-buffering. If the whole document is already in memory, prefer xml_to_json_from_slice, which avoids copying each event into an intermediate buffer.

ยงErrors

This may error when:

  • reading XML
  • encountering a malformed character reference (e.g. &#xZZ;)
  • writing to the output