Lines Matching refs:node

339  *	convert a TLV format isns attribute to xml node format.
341 * node - the xml node where the new node is being added to.
343 * name - the name of the attribute in xml node.
346 * 1: adding a xml child node.
347 * 2: adding a previous sibling node.
348 * 3: adding a xml content node.
350 * return - xml node.
356 xmlNodePtr node,
397 if (xmlSetProp(node, name, value)) {
398 child = node;
402 child = xmlNewChild(node, NULL, name, value);
407 xmlAddPrevSibling(node, child) == NULL) {
409 node = NULL;
411 node = child;
415 if (node) {
416 xmlNodeSetContent(node, value);
418 child = node;
421 if (xmlSetProp(node, name, value)) {
422 child = node;
437 * parse the properties of a xml node and convert them to the attributes
441 * node - the xml node that contains the properties.
450 xmlNodePtr node,
474 prop_value = xmlGetProp(node, prop_name);
494 * parse a xml node and convert it to one isns object attribute.
497 * node - the xml node.
506 xmlNodePtr node,
517 attr_value = xmlNodeGetContent(node);
537 * nodep - the pointer of the xml node for parsing.
552 xmlNodePtr node = *nodep;
557 while (node && ec == 0) {
558 if (node->type == XML_ELEMENT_NODE) {
559 children = node->children;
560 i = get_index_by_name(node->name);
569 if ((ec = parse_xml_prop(node, obj, i)) == 0 &&
574 children != node->children) {
591 *nodep = node;
594 /* unknown xml node */
601 node = node->next;
611 * locate the xml node from xml doc by matching the object UID.
616 * node - the pointer of matched xml node for returning.
628 xmlNodePtr *node,
646 *node = NULL;
672 *node = curr;
700 * generate a xml node for presenting an isns object.
703 * return - the xml node.
714 xmlNodePtr node;
724 node = xmlNewNode(NULL, xmlTag[i]);
725 if (!node) {
729 /* generate xml attributes of the node */
738 if (!convert_attr2xml(node, attr, name, type, 0)) {
739 xmlFreeNode(node);
754 if (!convert_attr2xml(node, attr, name, type, 1)) {
755 xmlFreeNode(node);
761 return (node);
919 * p - the pointer of current xml node.
934 xmlNodePtr node = (xmlNodePtr)*p;
939 if (node == NULL) {
945 node = xmlDocGetRootElement(doc);
946 if (node != NULL) {
947 node = node->children;
949 } else if (node->children != NULL) {
951 node = node->children;
952 } else if (node->next != NULL) {
954 node = node->next;
957 while (node != NULL && node->next == NULL) {
958 if (node->type == XML_ELEMENT_NODE) {
961 node = node->parent;
963 if (node != NULL) {
964 node = node->next;
968 /* there is a node, parse it */
969 if (node) {
970 ec = parse_xml_obj(&node, objp);
971 *p = (void *)node;
1011 xmlNodePtr node, prev;
1024 /* create the candidate node */
1036 &node, &context, &result);
1038 node = xmlDocGetRootElement(doc);
1041 /* cannot locate the point for inserting the node */
1042 if (node == NULL) {
1049 if (node->children) {
1050 node = node->children;
1051 while (node) {
1052 if (node->type == XML_ELEMENT_NODE) {
1053 i = get_index_by_name(node->name);
1061 prev = node;
1062 node = node->next;
1064 if (node == NULL) {
1065 node = xmlAddNextSibling(prev, candidate);
1067 node = xmlAddPrevSibling(node, candidate);
1070 node = xmlAddChild(node, candidate);
1073 if (node == NULL) {
1074 /* Failed, free the candidate node. */
1110 xmlNodePtr node, child;
1127 /* locate the node for the object */
1136 &node, &context, &result);
1139 if (node != NULL) {
1153 if (!convert_attr2xml(node,
1163 child = node->children;
1178 /* make a child node */
1179 if (!convert_attr2xml(node, attr,
1214 /* make a child node */
1215 if (!convert_attr2xml(node, attr,
1223 /* This case is for registering a node which has */
1259 xmlNodePtr node;
1282 &node, &context, &result);
1285 if (node) {
1286 xmlUnlinkNode(node);
1287 xmlFreeNode(node);
1320 xmlNodePtr node;
1350 &node, &context, &result);
1353 if (node != NULL) {
1354 node = node->children;
1357 /* get the matching membership node */
1358 while (node) {
1359 if (node->type == XML_ELEMENT_NODE) {
1360 i = get_index_by_name(node->name);
1364 prop_value = xmlGetProp(node, prop_name);
1374 node = node->next;
1378 if (node) {
1379 xmlUnlinkNode(node);
1380 xmlFreeNode(node);