pub struct XmlValidator { /* private fields */ }
Expand description
XML validator that tracks element stack and validates structure
Implementations§
Source§impl XmlValidator
impl XmlValidator
Sourcepub fn new(strict: bool, extended: bool) -> Self
pub fn new(strict: bool, extended: bool) -> Self
Create new validator with specified validation levels
Sourcepub fn validate_event<R: BufRead>(
&mut self,
event: &Event<'_>,
reader: &Reader<R>,
) -> Result<(), ParseError>
pub fn validate_event<R: BufRead>( &mut self, event: &Event<'_>, reader: &Reader<R>, ) -> Result<(), ParseError>
Validate XML structure during parsing
Sourcepub fn get_element_stack(&self) -> Vec<String>
pub fn get_element_stack(&self) -> Vec<String>
Get current element stack (for debugging)
Sourcepub fn is_in_element(&self) -> bool
pub fn is_in_element(&self) -> bool
Check if validator is currently inside any elements
Trait Implementations§
Source§impl Clone for XmlValidator
impl Clone for XmlValidator
Source§fn clone(&self) -> XmlValidator
fn clone(&self) -> XmlValidator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for XmlValidator
impl Debug for XmlValidator
Auto Trait Implementations§
impl Freeze for XmlValidator
impl RefUnwindSafe for XmlValidator
impl Send for XmlValidator
impl Sync for XmlValidator
impl Unpin for XmlValidator
impl UnwindSafe for XmlValidator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more