## Class attribute

zeep::xml::attribute — An attribute is a node, has an element as parent, but is not a child of this parent (!)

## Synopsis

    // In header: <zeep/xml/node.hpp>

    class attribute : public  {
    public:
      // types
      typedef element ;

      // construct/copy/destruct
      (attribute &);
      (attribute &&) ;
      (, ,  = );
      attribute & (attribute &&) ;

      // public member functions
       (attribute &) ;
       (attribute &) ;
       (attribute &) ;
       () ;
       ();
       (, );
       () ;
       () ;
       ();
       () ;
       () ;
       ();
       (node *) ;
       () ;
      template< N>  () ;
       (attribute &);
      node * () ;
      node * ();

      // protected member functions
       (, format_info) ;
    };

## Description

### `attribute` public construct/copy/destruct

1.     (attribute & attr);

2.     (attribute && attr) ;

3.     ( qname,  value,  id = );

4.     attribute & (attribute && attr) ;

### `attribute` public member functions

1.      (attribute & a) ;

2.      (attribute & a) ;

3.      (attribute & ns) ;

4.      () ;

   Nodes can have a name, and the XPath specification requires that a node can have a so-called expanded-name. This name consists of a local-name and a namespace which is a URI. And we can have a QName which is a concatenation of a prefix (that points to a namespace URI) and a local-name separated by a colon.

   To reduce storage requirements, names are stored in nodes as qnames, if at all.

5.      ( qn);

6.      ( prefix,  name);

   set the qname with two parameters, if prefix is empty the qname will be simply name otherwise the name will be `prefix:name`

   Parameters:

   `name` | The actual name to use
   `prefix` | The namespace prefix to use

7.      () ;

   Is this attribute an xmlns attribute?

8.      () ;

9.      ( v);

10.      () ;

    same as value, but checks to see if this really is a namespace attribute

11.      () ;

    return all content concatenated, including that of children.

12.      ( value);

    Set text, what really happens depends on the type of the subclass implementing this method.

13.      (node * n) ;

    compare nodes for equality

14.      () ;

    returns whether this attribute is an ID attribute, as defined in an accompanying DTD

15.     template< N>  () ;

    support for structured binding

16.      (attribute & a);

17.     node * () ;

    return an exact copy of this node, including all data in sub nodes

18.     node * ();

    return a copy of this node, including all data in sub nodes, but in contrast with clone the data is moved from this node to the cloned node. This node will be empty afterwards.

### `attribute` protected member functions

1.      ( os, format_info fmt) ;

   low level routine for writing out XML

   This method is usually called by operator<<(std::ostream&, zeep::xml::document&)