Class element_container
Defined in File node.hpp
Inheritance Relationships
Base Types
public mxml::node
(Class node)public mxml::node_list< element >
(Template Class node_list)
Derived Types
public mxml::document
(Class document)public mxml::element
(Class element)
Class Documentation
-
class element_container : public mxml::node, public mxml::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 mxml::document, mxml::element
Public Functions
-
inline element_container()
Default constructor.
-
inline element_container(const element_container &e)
Copy constructor.
-
inline ~element_container()
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 mxml::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 mxml::xpath object and use its evaluate method.
-
const_iterator find_first(std::string_view path) const
-
inline element_container()