pub struct Document {
pub root: Element,
}Expand description
An XML document with a single root element.
Fields§
§root: ElementImplementations§
Source§impl Document
impl Document
Sourcepub fn parse(text: &str) -> Result<Self, XmlError>
pub fn parse(text: &str) -> Result<Self, XmlError>
Parses a text XML document such as a hand-written AndroidManifest.xml.
Attributes are typed as aapt2 types them: android: attributes by
their framework format (true becomes a boolean, landscape an enum
value, @string/x a reference), the unqualified style attribute as
a reference, and others as strings. tools: attributes and elements
are removed, and only the predefined XML entities are expanded.
Trait Implementations§
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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