pub struct XmlParser { /* private fields */ }Expand description
XML解析器
Implementations§
Source§impl XmlParser
impl XmlParser
Sourcepub fn add_namespace(&mut self, prefix: String, uri: String)
pub fn add_namespace(&mut self, prefix: String, uri: String)
添加命名空间
Sourcepub fn parse_string(&self, xml_content: &str) -> Result<XmlElement>
pub fn parse_string(&self, xml_content: &str) -> Result<XmlElement>
解析XML字符串为元素树
Sourcepub fn parse_bytes(&self, xml_bytes: &[u8]) -> Result<XmlElement>
pub fn parse_bytes(&self, xml_bytes: &[u8]) -> Result<XmlElement>
解析XML字节流为元素树
Auto Trait Implementations§
impl Freeze for XmlParser
impl RefUnwindSafe for XmlParser
impl Send for XmlParser
impl Sync for XmlParser
impl Unpin for XmlParser
impl UnsafeUnpin for XmlParser
impl UnwindSafe for XmlParser
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