pub fn new(reader: R, base_iri: &str) -> Result<Self, RdfXmlError> {
        let mut reader = Reader::from_reader(reader);
        reader.expand_empty_elements(true);
        reader.trim_text(true);
        Ok(Self {
            reader: RdfXmlReader {
                reader,
                state: vec![RdfXmlState::Doc {
                    base_iri: if base_iri.is_empty() {
                        None
                    } else {
                        Some(Iri::parse(base_iri.to_owned())?)
                    },
                }],
                namespace_buffer: Vec::default(),
                bnode_id_generator: BlankNodeIdGenerator::default(),
                element_depth: 0,
                in_literal_depth: 0,
                known_rdf_id: HashSet::default(),
            },
            reader_buffer: Vec::default(),
            is_end: false,
        })
    }
/// Builds the parser from a `BufRead` implementation and a base IRI for relative IRI resolution.
///
/// The base IRI might be empty to state there is no base IRI.
Builds the parser from a `BufRead` implementation and a base IRI for relative IRI resolution.
The base IRI might be empty to state there is no base IRI.
Builds the parser from a ` BufRead ` implementation and a base IRI for relative IRI resolution . The base IRI might be empty to state there is no base IRI .
pub fn new(reader: R, base_iri: &str) -> Result<Self, RdfXmlError> {
        let mut reader = Reader::from_reader(reader);
        reader.expand_empty_elements(true);
        reader.trim_text(true);
        Ok(Self {
            reader: RdfXmlReader {
                reader,
                state: vec![RdfXmlState::Doc {
                    base_iri: if base_iri.is_empty() {
                        None
                    } else {
                        Some(Iri::parse(base_iri.to_owned())?)
                    },
                }],
                namespace_buffer: Vec::default(),
                bnode_id_generator: BlankNodeIdGenerator::default(),
                element_depth: 0,
                in_literal_depth: 0,
                known_rdf_id: HashSet::default(),
            },
            reader_buffer: Vec::default(),
            is_end: false,
        })
    }
pub fn new ( reader : R , base_iri : & str ) -> Result < Self , RdfXmlError > { let mut reader = Reader :: from_reader ( reader ) ; reader . expand_empty_elements ( true ) ; reader . trim_text ( true ) ; Ok ( Self { reader : RdfXmlReader { reader , state : vec ! [ RdfXmlState Doc { base_iri if base_iri is_empty ( ) { None } else { Some ( Iri parse ( base_iri to_owned ( ) ) ) } } ] , namespace_buffer : Vec :: default ( ) , bnode_id_generator : BlankNodeIdGenerator :: default ( ) , element_depth : 0 , in_literal_depth : 0 , known_rdf_id : HashSet :: default ( ) , } , reader_buffer : Vec :: default ( ) , is_end : false , } ) }
Builds the parser from a `BufRead` implementation and a base IRI for relative IRI resolution.
Builds the parser from a ` BufRead ` implementation and a base IRI for relative IRI resolution .
reader
R
base_iri
&str