[−][src]Enum xmlparser::Token
An XML token.
Variants
Declaration token.
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
--- - version
----- - encoding?
--- - standalone?
------------------------------------------------------- - span
Fields of Declaration
Processing instruction token.
<?target content?>
------ - target
------- - content?
------------------ - span
Comment token.
<!-- text -->
------ - text
------------- - span
DOCTYPE start token.
<!DOCTYPE greeting SYSTEM "hello.dtd" [
-------- - name
------------------ - external_id?
--------------------------------------- - span
Fields of DtdStart
Empty DOCTYPE token.
<!DOCTYPE greeting SYSTEM "hello.dtd">
-------- - name
------------------ - external_id?
-------------------------------------- - span
Fields of EmptyDtd
ENTITY token.
Can appear only inside the DTD.
<!ENTITY ns_extend "http://test.com">
--------- - name
--------------- - definition
------------------------------------- - span
Fields of EntityDeclaration
DOCTYPE end token.
<!DOCTYPE svg [
...
]>
-- - span
Fields of DtdEnd
span: StrSpan<'a>
Element start token.
<ns:elem attr="value"/>
-- - prefix
---- - local
-------- - span
Attribute token.
<elem ns:attr="value"/>
-- - prefix
---- - local
----- - value
--------------- - span
Element end token.
<ns:elem>text</ns:elem>
- ElementEnd::Open
- - span
<ns:elem>text</ns:elem>
-- ---- - ElementEnd::Close(prefix, local)
---------- - span
<ns:elem/>
- ElementEnd::Empty
-- - span
Fields of ElementEnd
end: ElementEnd<'a>
span: StrSpan<'a>
Text token.
Contains text between elements including whitespaces.
Basically everything between >
and <
.
Except ]]>
, which is not allowed and will lead to an error.
<p> text </p>
------ - text
The token span is equal to the text
.
Fields of Text
text: StrSpan<'a>
CDATA token.
<p><![CDATA[text]]></p>
---- - text
---------------- - span
Trait Implementations
impl<'a> Clone for Token<'a>
[src]
impl<'a> Copy for Token<'a>
[src]
impl<'a> Debug for Token<'a>
[src]
impl<'a> PartialEq<Token<'a>> for Token<'a>
[src]
impl<'a> StructuralPartialEq for Token<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Token<'a>
impl<'a> Send for Token<'a>
impl<'a> Sync for Token<'a>
impl<'a> Unpin for Token<'a>
impl<'a> UnwindSafe for Token<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,