|
Orcus
|
#include <xml_structure_tree.hpp>
Public Member Functions | |
| walker (const walker &r) | |
| walker & | operator= (const walker &r) |
| element | root () |
| element | descend (const entity_name &name) |
| element | ascend () |
| void | get_children (entity_names_type &names) |
| void | get_attributes (entity_names_type &names) |
| size_t | get_xmlns_index (xmlns_id_t ns) const |
| std::string | get_xmlns_short_name (xmlns_id_t ns) const |
| std::string | get_path () const |
| element | select_by_path (const std::string &path) |
Friends | |
| class | xml_structure_tree |
This class allows client to traverse the tree.
| element orcus::xml_structure_tree::walker::ascend | ( | ) |
Move up to the parent element.
| element orcus::xml_structure_tree::walker::descend | ( | const entity_name & | name | ) |
Descend into specified child element.
| ns | namespace of child element |
| name | name of child element |
| void orcus::xml_structure_tree::walker::get_attributes | ( | entity_names_type & | names | ) |
Get a list of names of all attributes that belong to current element. The list of names is in order of appearance.
| names | list of attribute names in order of appearance. |
| void orcus::xml_structure_tree::walker::get_children | ( | entity_names_type & | names | ) |
Get a list of names of all child elements at current element position. The list of names is in order of appearance.
| names | list of child element names in order of appearance. |
| std::string orcus::xml_structure_tree::walker::get_path | ( | ) | const |
Get a XPath like ID for the element inside of the XML tree.
| size_t orcus::xml_structure_tree::walker::get_xmlns_index | ( | xmlns_id_t | ns | ) | const |
Get a numerical, 0-based index of given XML namespace.
| ns | XML namespace ID. |
xml_structure_tree::walker::index_not_found if the namespace is not found in this structure. | element orcus::xml_structure_tree::walker::root | ( | ) |
Set current position to the root element, and return the root element.
| element orcus::xml_structure_tree::walker::select_by_path | ( | const std::string & | path | ) |
Select an element by a path expression. The path expression may be generated by xml_structure_tree::walker::get_path.
| path | a simple XPath like expression |
1.8.14