Struct markup5ever::interface::QualName [] [src]

pub struct QualName {
    pub prefix: Option<Prefix>,
    pub ns: Namespace,
    pub local: LocalName,
}

A name with a 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

Methods

impl QualName
[src]

Trait Implementations

impl PartialEq for QualName
[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 QualName
[src]

impl PartialOrd for QualName
[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 QualName
[src]

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

impl Hash for QualName
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for QualName
[src]

Formats the value using the given formatter.

impl Clone for QualName
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more