Removed prefix parameter to xml_new
Added xml_new_body() by mgsmith
This commit is contained in:
parent
d36ab2e093
commit
c5e2039cac
26 changed files with 167 additions and 113 deletions
|
|
@ -180,11 +180,14 @@ check_identityref(cxobj *x0,
|
|||
goto done;
|
||||
/* Create xmlns attribute to x1 XXX same code ^*/
|
||||
if (prefix){
|
||||
if ((xa = xml_new(prefix, "xmlns", x, CX_ATTR)) == NULL)
|
||||
if ((xa = xml_new(prefix, x, CX_ATTR)) == NULL)
|
||||
goto done;
|
||||
if (xml_prefix_set(xa, "xmlns") < 0)
|
||||
goto done;
|
||||
|
||||
}
|
||||
else{
|
||||
if ((xa = xml_new("xmlns", NULL, x, CX_ATTR)) == NULL)
|
||||
if ((xa = xml_new("xmlns", x, CX_ATTR)) == NULL)
|
||||
goto done;
|
||||
}
|
||||
if (xml_value_set(xa, ns0) < 0)
|
||||
|
|
@ -340,7 +343,7 @@ text_modify(clicon_handle h,
|
|||
}
|
||||
/* Add new xml node but without parent - insert when node fully
|
||||
copied (see changed conditional below) */
|
||||
if ((x0 = xml_new(x1name, NULL, NULL, CX_ELMNT)) == NULL)
|
||||
if ((x0 = xml_new(x1name, NULL, CX_ELMNT)) == NULL)
|
||||
goto done;
|
||||
xml_spec_set(x0, y0);
|
||||
|
||||
|
|
@ -354,7 +357,7 @@ text_modify(clicon_handle h,
|
|||
if (op==OP_NONE)
|
||||
xml_flag_set(x0, XML_FLAG_NONE); /* Mark for potential deletion */
|
||||
if (x1bstr){ /* empty type does not have body */
|
||||
if ((x0b = xml_new("body", NULL, x0, CX_BODY)) == NULL)
|
||||
if ((x0b = xml_new("body", x0, CX_BODY)) == NULL)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
|
@ -488,7 +491,7 @@ text_modify(clicon_handle h,
|
|||
if (x0){
|
||||
xml_purge(x0);
|
||||
}
|
||||
if ((x0 = xml_new(x1name, NULL, x0p, CX_ELMNT)) == NULL)
|
||||
if ((x0 = xml_new(x1name, x0p, CX_ELMNT)) == NULL)
|
||||
goto done;
|
||||
if (xml_copy(x1, x0) < 0)
|
||||
goto done;
|
||||
|
|
@ -506,7 +509,7 @@ text_modify(clicon_handle h,
|
|||
* copied (see changed conditional below)
|
||||
* Note x0 may dangle cases if exit before changed conditional
|
||||
*/
|
||||
if ((x0 = xml_new(x1name, NULL, NULL, CX_ELMNT)) == NULL)
|
||||
if ((x0 = xml_new(x1name, NULL, CX_ELMNT)) == NULL)
|
||||
goto done;
|
||||
xml_spec_set(x0, y0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue