pub fn parse<R: Read>(r: R) -> Result<Element, ParseError> {
        let nodes = Element::parse_all(r)?;
        for node in nodes {
            if let XMLNode::Element(elem) = node { return Ok(elem) }
        }
        // This assume the underlying xml library throws an error on no root element
        unreachable!();
    }
/// Parses some data into an Element
Parses some data into an Element
Parses some data into an Element
pub fn parse<R: Read>(r: R) -> Result<Element, ParseError> {
        let nodes = Element::parse_all(r)?;
        for node in nodes {
            if let XMLNode::Element(elem) = node { return Ok(elem) }
        }
        // This assume the underlying xml library throws an error on no root element
        unreachable!();
    }
pub fn parse < R : Read > ( r : R ) -> Result < Element , ParseError > { let nodes = Element :: parse_all ( r ) ? ; for node in nodes { if let XMLNode :: Element ( elem ) = node { return Ok ( elem ) } } // This assume the underlying xml library throws an error on no root element unreachable ! ( ) ; }
Parses some data into an Element
Parses some data into an Element
r
R
r
R