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

African Coffee Table80120
``` Without XML namespaces we can't use those two fragments in occur XML at same time. however if we declare a namespace we could instead say:

// 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 of fully qualified name, used for namespace lookup.

Local name of a value.

Resolved namespace of QName.

Methods

impl QName
[src]

Constructs a new QName from prefix and local part. Namespace is set to empty.

Constructs a new QName with only local part. Namespace is set to empty.

Trait Implementations

impl PartialEq for QName
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for QName
[src]

impl PartialOrd for QName
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

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]

This method returns an Ordering between self and other. Read more

impl Clone for QName
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for QName
[src]

Formats the value using the given formatter.