| 77 | } |
| 78 | |
| 79 | const xml_attr* xml2_node::first_attr() const |
| 80 | { |
| 81 | ACL_ARRAY* a = node_->attr_list; |
| 82 | if (a == NULL) { |
| 83 | return NULL; |
| 84 | } |
| 85 | |
| 86 | if (attr_iter_ == NULL) { |
| 87 | const_cast<xml2_node*>(this)->attr_iter_ = |
| 88 | (ACL_ITER*) acl_mymalloc(sizeof(ACL_ITER)); |
| 89 | } |
| 90 | |
| 91 | ACL_XML2_ATTR* attr = (ACL_XML2_ATTR*) a->iter_head(attr_iter_, a); |
| 92 | if (attr == NULL) { |
| 93 | return NULL; |
| 94 | } |
| 95 | |
| 96 | xml2_attr* xa = NEW xml2_attr(const_cast<xml2_node*>(this), attr); |
| 97 | const_cast<xml2_node*>(this)->attrs_tmp_.push_back(xa); |
| 98 | return xa; |
| 99 | } |
| 100 | |
| 101 | const xml_attr* xml2_node::next_attr() const |
| 102 | { |
no test coverage detected