zeep::xml::attribute — An attribute is a node, has an element as parent, but is not a child of this parent (!)
// In header: </build/libzeep-C5C4mJ/libzeep-3.0.5/zeep/xml/node.hpp> class attribute : public zeep::xml::node { public: // construct/copy/destruct attribute(const std::string &, const std::string &, bool = false); // public member functions virtual std::string qname() const; std::string value() const; void value(const std::string &); virtual std::string str() const; virtual void str(const std::string &); virtual void write(writer &) const; virtual bool equals(const node *) const; virtual node * clone() const; virtual bool id() const; };
attribute
public member functionsvirtual std::string qname() const;
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.
std::string value() const;
void value(const std::string & v);
virtual std::string str() const;return all content concatenated, including that of children.
virtual void str(const std::string & value);both attribute and element implement str(const string&), others will throw
virtual void write(writer & w) const;writing out
virtual bool equals(const node * n) const;Compare the node with n.
virtual node * clone() const;Deep clone the node.
virtual bool id() const;