Struct xml5ever::tokenizer::QName
[−]
[src]
pub struct QName { pub prefix: Prefix, pub local: LocalName, pub namespace_url: Namespace, }
Fully qualified name. Used to depict names of tags and attributes.
Used to differentiate between similar XML fragments. For example ```ignore // HTML
Apples | Bananas |
// Furniture XML
// Furniture XML <furn:table> <furn:name>African Coffee Table</furn:name> <furn:width>80</furn:width> <furn:length>120</furn:length> </furn:table>
and bind it to a different name.
For this reason we parse names that contain a colon in the following way
< furn:table> | | | +- local name | prefix (when resolved gives namespace_url)
Fields
prefix: Prefix
Prefix of fully qualified name, used for namespace lookup.
local: LocalName
Local name of a value.
namespace_url: Namespace
Resolved namespace of QName
.
Methods
impl QName
[src]
fn new(prefix: Prefix, local: LocalName) -> QName
Constructs a new QName
from prefix and local part.
Namespace is set to empty.
fn new_empty(local: LocalName) -> QName
Constructs a new QName
with only local part.
Namespace is set to empty.
Trait Implementations
impl PartialEq for QName
[src]
fn eq(&self, __arg_0: &QName) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &QName) -> bool
This method tests for !=
.
impl Eq for QName
[src]
impl PartialOrd for QName
[src]
fn partial_cmp(&self, __arg_0: &QName) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &QName) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &QName) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &QName) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &QName) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for QName
[src]
fn cmp(&self, __arg_0: &QName) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl Clone for QName
[src]
fn clone(&self) -> QName
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more