| 144 | } |
| 145 | |
| 146 | static void test_json_find2(ACL_JSON* json) |
| 147 | { |
| 148 | const char* tag = "onclick"; |
| 149 | ACL_ARRAY* a = acl_json_getElementsByTagName(json, tag); |
| 150 | ACL_ITER iter; |
| 151 | |
| 152 | printf("------------ in %s ------------\r\n", __FUNCTION__); |
| 153 | |
| 154 | if (a) { |
| 155 | acl_foreach(iter, a) { |
| 156 | ACL_JSON_NODE* node = (ACL_JSON_NODE*) iter.data; |
| 157 | printf("find %s result: %s\r\n", tag, STR(node->text)); |
| 158 | } |
| 159 | acl_json_free_array(a); |
| 160 | } |
| 161 | |
| 162 | tag = "help"; |
| 163 | a = acl_json_getElementsByTagName(json, tag); |
| 164 | if (a) { |
| 165 | acl_foreach(iter, a) { |
| 166 | ACL_JSON_NODE* node = (ACL_JSON_NODE*) iter.data; |
| 167 | printf("find %s result: %s\r\n", tag, STR(node->text)); |
| 168 | } |
| 169 | acl_json_free_array(a); |
| 170 | } |
| 171 | printf(">>find %s end\r\n\r\n", tag); |
| 172 | } |
| 173 | |
| 174 | static void test_json_data(const char* data) |
| 175 | { |
no test coverage detected
searching dependent graphs…