pub struct NamespaceDetector { /* private fields */ }
Expand description
Comprehensive namespace detection and management
Implementations§
Source§impl NamespaceDetector
impl NamespaceDetector
Sourcepub fn detect_from_xml<R: BufRead>(
&mut self,
reader: R,
) -> Result<NamespaceDetectionResult, ParseError>
pub fn detect_from_xml<R: BufRead>( &mut self, reader: R, ) -> Result<NamespaceDetectionResult, ParseError>
Detect namespaces from XML content
Sourcepub fn current_scope(&self) -> &NamespaceScope
pub fn current_scope(&self) -> &NamespaceScope
Get current namespace scope
Sourcepub fn resolve_prefix(&self, prefix: &str) -> Option<String>
pub fn resolve_prefix(&self, prefix: &str) -> Option<String>
Resolve a prefix to its URI in current scope
Sourcepub fn get_default_namespace(&self) -> Option<&String>
pub fn get_default_namespace(&self) -> Option<&String>
Get default namespace in current scope
Sourcepub fn is_namespace_declared(&self, uri: &str) -> bool
pub fn is_namespace_declared(&self, uri: &str) -> bool
Check if a namespace is declared in current scope
Sourcepub fn find_prefix_for_uri(&self, uri: &str) -> Option<String>
pub fn find_prefix_for_uri(&self, uri: &str) -> Option<String>
Find prefix for a namespace URI in current scope
Sourcepub fn add_warning(&mut self, warning: NamespaceWarning)
pub fn add_warning(&mut self, warning: NamespaceWarning)
Add a warning
Sourcepub fn get_detected_version(&self) -> Option<ERNVersion>
pub fn get_detected_version(&self) -> Option<ERNVersion>
Get detected ERN version
Sourcepub fn get_detected_namespaces(&self) -> &IndexMap<String, String>
pub fn get_detected_namespaces(&self) -> &IndexMap<String, String>
Get all detected namespace declarations
Trait Implementations§
Source§impl Clone for NamespaceDetector
impl Clone for NamespaceDetector
Source§fn clone(&self) -> NamespaceDetector
fn clone(&self) -> NamespaceDetector
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 NamespaceDetector
impl Debug for NamespaceDetector
Auto Trait Implementations§
impl Freeze for NamespaceDetector
impl RefUnwindSafe for NamespaceDetector
impl Send for NamespaceDetector
impl Sync for NamespaceDetector
impl Unpin for NamespaceDetector
impl UnwindSafe for NamespaceDetector
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