# Class element_container

- Defined in File node.hpp

## Inheritance Relationships

### Base Types

- `public zeem::node` (Class node)

- `public zeem::node_list< element >` (Template Class node_list)

### Derived Types

- `public zeem::document` (Class document)

- `public zeem::element` (Class element)

## Class Documentation

class element_container : public zeem::node, public zeem::node_list<element>

  internal class as base class for element and document

  Both element and document can have a list of child nodes and both are nodes implementing the namespace routines e.g.

  However, element has attributes whereas document does not. And document has the constraint that it can have at most one child element. But since the rest is so similar they have a common base class: element_container.

  element_container is not exported.

  Subclassed by zeem::document, zeem::element

  Public Functions

  inline element_container()

    Default constructor.

  inline element_container(const element_container &e)

    Copy constructor.

  inline ~element_container() override

    Destructor.

  inline node_list nodes()

    This method allows access to the nodes not visible using the regular interface of this class itself.

    Returns:

      node_list<> The node_list for nodes of all types

  inline const node_list nodes() const

    This method allows read access to the nodes not visible using the regular interface of this class itself.

    Returns:

      node_list<> The node_list for nodes of all types

  virtual std::string str() const override

    will return the concatenation of str() from all child nodes

  element_set find(std::string_view path) const

    return the elements that match XPath path.

    If you need to find other classes than xml::element, of if your XPath contains variables, you should create a zeem::xpath object and use its evaluate method.

  iterator find_first(std::string_view path)

    return the first element that matches XPath path.

    If you need to find other classes than xml::element, of if your XPath contains variables, you should create a zeem::xpath object and use its evaluate method.

  const_iterator find_first(std::string_view path) const