pub struct Element { /* private fields */ }Expand description
An XML element retaining names, namespace resolution, attributes, and order.
Implementations§
Source§impl Element
impl Element
pub fn qname(&self) -> &str
pub fn prefix(&self) -> Option<&str>
pub fn local_name(&self) -> &str
pub fn namespace_uri(&self) -> Option<&str>
pub fn attributes(&self) -> &[Attribute]
pub fn nodes(&self) -> &[Node]
Sourcepub const fn was_empty_element(&self) -> bool
pub const fn was_empty_element(&self) -> bool
Whether the source used an empty-element tag such as <dt:Property/>.
Sourcepub fn children(&self) -> impl Iterator<Item = &Element>
pub fn children(&self) -> impl Iterator<Item = &Element>
Direct child elements in document order.
Sourcepub fn attribute_ns(
&self,
namespace_uri: Option<&str>,
local_name: &str,
) -> Option<&str>
pub fn attribute_ns( &self, namespace_uri: Option<&str>, local_name: &str, ) -> Option<&str>
Finds an attribute by resolved namespace URI and local name.
Sourcepub fn direct_text(&self) -> String
pub fn direct_text(&self) -> String
Direct semantic text and CDATA content, preserving order.
Trait Implementations§
impl Eq for Element
impl StructuralPartialEq for Element
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnsafeUnpin for Element
impl UnwindSafe for Element
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