pub struct XPathSelector { /* private fields */ }
Expand description
XPath-like selector for extracting specific XML elements and values
Implementations§
Source§impl XPathSelector
impl XPathSelector
Sourcepub fn new(xpath: &str) -> Result<Self, ParseError>
pub fn new(xpath: &str) -> Result<Self, ParseError>
Create a new XPath selector
Sourcepub fn ddex_release_titles() -> Result<Self, ParseError>
pub fn ddex_release_titles() -> Result<Self, ParseError>
Create selector for common DDEX patterns
Sourcepub fn ddex_isrcs() -> Result<Self, ParseError>
pub fn ddex_isrcs() -> Result<Self, ParseError>
Create selector for ISRC extraction
Sourcepub fn ddex_release_ids() -> Result<Self, ParseError>
pub fn ddex_release_ids() -> Result<Self, ParseError>
Create selector for release IDs
Sourcepub fn namespace_aware(self, enabled: bool) -> Self
pub fn namespace_aware(self, enabled: bool) -> Self
Set namespace awareness
Sourcepub fn case_sensitive(self, enabled: bool) -> Self
pub fn case_sensitive(self, enabled: bool) -> Self
Set case sensitivity
Sourcepub fn max_results(self, max: usize) -> Self
pub fn max_results(self, max: usize) -> Self
Set maximum number of results
Sourcepub fn fast_mode(self, enabled: bool) -> Self
pub fn fast_mode(self, enabled: bool) -> Self
Enable fast mode (skip some validations for better performance)
Sourcepub fn select<R: BufRead>(&self, reader: R) -> Result<XPathResult, ParseError>
pub fn select<R: BufRead>(&self, reader: R) -> Result<XPathResult, ParseError>
Select elements matching the XPath expression
Source§impl XPathSelector
Convenience functions for common DDEX XPath patterns
impl XPathSelector
Convenience functions for common DDEX XPath patterns
Sourcepub fn select_release_titles<R: BufRead>(
reader: R,
) -> Result<Vec<String>, ParseError>
pub fn select_release_titles<R: BufRead>( reader: R, ) -> Result<Vec<String>, ParseError>
Select all release titles
Sourcepub fn select_isrcs<R: BufRead>(reader: R) -> Result<Vec<String>, ParseError>
pub fn select_isrcs<R: BufRead>(reader: R) -> Result<Vec<String>, ParseError>
Select all ISRCs
Sourcepub fn select_with_xpath<R: BufRead>(
reader: R,
xpath: &str,
) -> Result<Vec<String>, ParseError>
pub fn select_with_xpath<R: BufRead>( reader: R, xpath: &str, ) -> Result<Vec<String>, ParseError>
Select elements with custom XPath
Sourcepub fn select_multiple<R: BufRead>(
reader: R,
xpaths: &[&str],
) -> Result<Vec<Vec<String>>, ParseError>
pub fn select_multiple<R: BufRead>( reader: R, xpaths: &[&str], ) -> Result<Vec<Vec<String>>, ParseError>
High-performance batch selection for multiple XPath expressions
Trait Implementations§
Source§impl Clone for XPathSelector
impl Clone for XPathSelector
Source§fn clone(&self) -> XPathSelector
fn clone(&self) -> XPathSelector
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 moreAuto Trait Implementations§
impl Freeze for XPathSelector
impl RefUnwindSafe for XPathSelector
impl Send for XPathSelector
impl Sync for XPathSelector
impl Unpin for XPathSelector
impl UnwindSafe for XPathSelector
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