| 204 | XML_NODE* CXml::NavigateToNode(LPCSTR path, int index) { return NavigateToNode(GetLocalRoot() ? GetLocalRoot() : GetRoot(), path, index); } |
| 205 | |
| 206 | XML_NODE* CXml::NavigateToNodeWithAttribute(LPCSTR tag_name, LPCSTR attrib_name, LPCSTR attrib_value) |
| 207 | { |
| 208 | XML_NODE* root = GetLocalRoot() ? GetLocalRoot() : GetRoot(); |
| 209 | const int tabsCount = GetNodesNum(root, tag_name); |
| 210 | |
| 211 | for (int i = 0; i < tabsCount; ++i) |
| 212 | { |
| 213 | LPCSTR result = ReadAttrib(root, tag_name, i, attrib_name, ""); |
| 214 | if (result && xr_strcmp(result, attrib_value) == 0) |
| 215 | { |
| 216 | return NavigateToNode(root, tag_name, i); |
| 217 | } |
| 218 | } |
| 219 | return NULL; |
| 220 | } |
| 221 | |
| 222 | bool CXml::HasNode(LPCSTR path, int index) |
| 223 | { |
no test coverage detected