| 266 | } |
| 267 | |
| 268 | static void xml_node_attrs(ACL_XML3_NODE* node, int n) |
| 269 | { |
| 270 | int i; |
| 271 | ACL_ITER iter; |
| 272 | |
| 273 | acl_foreach(iter, node->attr_list) { |
| 274 | ACL_XML3_ATTR *attr = (ACL_XML3_ATTR*) iter.data; |
| 275 | |
| 276 | for (i = 0; i < n; i++) |
| 277 | printf("\t"); |
| 278 | |
| 279 | printf("attr-><%s>(size=%ld)=\"<%s>(size=%ld)\"\n", |
| 280 | attr->name, (long) attr->name_size, |
| 281 | attr->value, (long) attr->value_size); |
| 282 | |
| 283 | if (attr->name_size != strlen(attr->name)) { |
| 284 | printf("%s(%d): name_size invalid\r\n", |
| 285 | __FUNCTION__, __LINE__); |
| 286 | exit (1); |
| 287 | } |
| 288 | if (attr->value_size != strlen(attr->value)) { |
| 289 | printf("%s(%d): value_size invaid\r\n", |
| 290 | __FUNCTION__, __LINE__); |
| 291 | exit (1); |
| 292 | } |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | static void walk_xml_node(ACL_XML3_NODE *node, int n) |
| 297 | { |
searching dependent graphs…