An XML document tree node.
| 534 | |
| 535 | /// An XML document tree node. |
| 536 | struct xml_node_struct |
| 537 | { |
| 538 | /// Default ctor |
| 539 | /// \param type - node type |
| 540 | xml_node_struct(impl::xml_memory_page* page, xml_node_type type) : |
| 541 | header(reinterpret_cast<uintptr_t>(page) | (type - 1)), |
| 542 | parent(0), |
| 543 | name(0), |
| 544 | value(0), |
| 545 | first_child(0), |
| 546 | prev_sibling_c(0), |
| 547 | next_sibling(0), |
| 548 | first_attribute(0) |
| 549 | { |
| 550 | } |
| 551 | |
| 552 | uintptr_t header; |
| 553 | |
| 554 | xml_node_struct* parent; ///< Pointer to parent |
| 555 | |
| 556 | char_t* name; ///< Pointer to element name. |
| 557 | char_t* value; ///< Pointer to any associated string data. |
| 558 | |
| 559 | xml_node_struct* first_child; ///< First child |
| 560 | |
| 561 | xml_node_struct* prev_sibling_c; ///< Left brother (cyclic list) |
| 562 | xml_node_struct* next_sibling; ///< Right brother |
| 563 | |
| 564 | xml_attribute_struct* first_attribute; ///< First attribute |
| 565 | }; |
| 566 | } |
| 567 | |
| 568 | PUGI__NS_BEGIN |