* C-API change: xml_new() changed from xml_new(name, xp, ys) to xml_new(name, prefix, xp, type)

* If you have used, `ys`, add `xml_spec_set(x, ys)` after the statement
  * If you have `xml_type_set(x, TYPE)` or `xml_prefix_set(x, PREFIX)` immediately after the statement, you can remove those and set them directly as: `xml_new(name, PREFIX, xp, TYPE)`
This commit is contained in:
Olof hagsand 2020-03-12 22:29:28 +01:00
parent 71efe18f94
commit 7425a3b520
26 changed files with 135 additions and 155 deletions

View file

@ -685,11 +685,8 @@ restconf_insert_attributes(cxobj *xdata,
if (xmlns_set(xdata, "yang", YANG_XML_NAMESPACE) < 0)
goto done;
/* Then add insert attribute */
if ((xa = xml_new("insert", xdata, NULL)) == NULL)
if ((xa = xml_new("insert", "yang", xdata, CX_ATTR)) == NULL)
goto done;
if (xml_prefix_set(xa, "yang") < 0)
goto done;
xml_type_set(xa, CX_ATTR);
if (xml_value_set(xa, instr) < 0)
goto done;
}
@ -703,11 +700,8 @@ restconf_insert_attributes(cxobj *xdata,
else
attrname="value";
/* Then add value/key attribute */
if ((xa = xml_new(attrname, xdata, NULL)) == NULL)
if ((xa = xml_new(attrname, "yang", xdata, CX_ATTR)) == NULL)
goto done;
if (xml_prefix_set(xa, "yang") < 0)
goto done;
xml_type_set(xa, CX_ATTR);
if ((ret = api_path2xpath(pstr, ys_spec(y), &xpath, &nsc, NULL)) < 0)
goto done;
if ((cb = cbuf_new()) == NULL){