Name

GroveNodeWithNamespace — Base class for GroveElement and GroveAttr.

Synopsis

class GroveNodeWithNamespace : public GroveNodeSernaApi::GroveNode {
public:
  // construct/copy/destruct
  GroveNodeWithNamespace(SernaApiBase *);
  ~GroveNodeWithNamespace();

  // public member functions

  SString localName() const;
  SString xmlNsPrefix() const;
  SString xmlNsUri() const;
  SString xmlElNsUri() const;
  SString getXmlNsByPrefix(const SString &) const;
  SString getPrefixByXmlNs(const SString &) const;
  void addToPrefixMap(const SString &, const SString &) ;
  void eraseFromPrefixMap(const SString &) ;
};

Description

GroveNodeWithNamespace construct/copy/destruct

  1. GroveNodeWithNamespace(SernaApiBase * );


  2. ~GroveNodeWithNamespace();


GroveNodeWithNamespace public member functions

  1. SString localName() const;

    Returns local name (without namespace) of an element or attribute.


  2. SString xmlNsPrefix() const;

    Returns namespace prefix for current element or attribute. Returns empty string if there is no namespace prefix defined for this node.


  3. SString xmlNsUri() const;

    Returns string corresponding to namespace URI.


  4. SString xmlElNsUri() const;

    Attributes only: returns URI of XML namespace of a parent element.


  5. SString getXmlNsByPrefix(const SString & prefix) const;

    Get namespace URI by xmlns prefix in given context.


  6. SString getPrefixByXmlNs(const SString & uri) const;

    Get the nearest defined prefix which defines ns. If not found, returns null string.


  7. void addToPrefixMap(const SString & prefix, const SString & nsUri) ;

    Add prefix/URI pair mapping to the current node.


  8. void eraseFromPrefixMap(const SString & prefix) ;

    Remove prefix from namespace prefix map of a current node.