Removed prefix parameter to xml_new

Added xml_new_body() by mgsmith
This commit is contained in:
Olof hagsand 2020-03-17 11:18:22 +01:00
parent d36ab2e093
commit c5e2039cac
26 changed files with 167 additions and 113 deletions

View file

@ -591,7 +591,7 @@ xml_parse_file2(int fd,
(endtag && (state == endtaglen))){
state = 0;
if (*xt == NULL)
if ((*xt = xml_new(XML_TOP_SYMBOL, NULL, NULL, CX_ELMNT)) == NULL)
if ((*xt = xml_new(XML_TOP_SYMBOL, NULL, CX_ELMNT)) == NULL)
goto done;
if ((ret = _xml_parse(ptr, yb, yspec, *xt, xerr)) < 0)
goto done;
@ -657,7 +657,7 @@ xml_parse_string2(const char *str,
return -1;
}
if (*xt == NULL){
if ((*xt = xml_new(XML_TOP_SYMBOL, NULL, NULL, CX_ELMNT)) == NULL)
if ((*xt = xml_new(XML_TOP_SYMBOL, NULL, CX_ELMNT)) == NULL)
return -1;
}
return _xml_parse(str, yb, yspec, *xt, xerr);
@ -698,7 +698,7 @@ xml_parse_string(const char *str,
}
if (*xt == NULL){
yb = YB_TOP; /* ad-hoc #1 */
if ((*xt = xml_new(XML_TOP_SYMBOL, NULL, NULL, CX_ELMNT)) == NULL)
if ((*xt = xml_new(XML_TOP_SYMBOL, NULL, CX_ELMNT)) == NULL)
return -1;
}
else{