PrevUpHomeNext

Class name_space

zeep::xml::name_space — Just like an attribute, a name_space node is not a child of an element.

Synopsis

// In header: </build/libzeep-A4EBmV/libzeep-3.0.5/zeep/xml/node.hpp>


class name_space : public zeep::xml::node {
public:
  // construct/copy/destruct
  name_space(const std::string &, const std::string &);

  // public member functions
  virtual std::string qname() const;
  virtual std::string ns() const;
  virtual std::string prefix() const;
  void prefix(const std::string &);
  std::string uri() const;
  void uri(const std::string &);
  virtual std::string str() const;
  virtual void write(writer &) const;
  virtual bool equals(const node *) const;
  virtual node * clone() const;
};

Description

name_space public construct/copy/destruct

  1. name_space(const std::string & prefix, const std::string & uri);

name_space public member functions

  1. virtual 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.

  2. virtual std::string ns() const;
    Returns the namespace URI for the node, if it can be resolved.
  3. virtual std::string prefix() const;
    The prefix for the node as parsed from the qname.
  4. void prefix(const std::string & p);
  5. std::string uri() const;
  6. void uri(const std::string & u);
  7. virtual std::string str() const;
    return all content concatenated, including that of children.
  8. virtual void write(writer & w) const;
    writing out
  9. virtual bool equals(const node * n) const;
    Compare the node with n.
  10. virtual node * clone() const;
    Deep clone the node.

PrevUpHomeNext