mirror of
https://github.com/michaelrsweet/mxml.git
synced 2025-02-21 17:55:30 +00:00
mxmlSave* no longer write all siblings of the passed node, just that node and
its children.
This commit is contained in:
parent
34424e2757
commit
c0f12e6a79
2
CHANGES
2
CHANGES
@ -9,6 +9,8 @@ CHANGES IN Mini-XML 2.7
|
|||||||
specific data key on UNIX-based operating systems (STR #103)
|
specific data key on UNIX-based operating systems (STR #103)
|
||||||
- mxmlLoad* did not error out on XML with multiple root nodes (STR #101)
|
- mxmlLoad* did not error out on XML with multiple root nodes (STR #101)
|
||||||
- Fixed an issue with the _mxml_vstrdupf function (STR #107)
|
- Fixed an issue with the _mxml_vstrdupf function (STR #107)
|
||||||
|
- mxmlSave* no longer write all siblings of the passed node, just that
|
||||||
|
node and its children (STR #109)
|
||||||
|
|
||||||
|
|
||||||
CHANGES IN Mini-XML 2.6
|
CHANGES IN Mini-XML 2.6
|
||||||
|
18
mxml-file.c
18
mxml-file.c
@ -2739,8 +2739,6 @@ mxml_write_node(mxml_node_t *node, /* I - Node to write */
|
|||||||
char s[255]; /* Temporary string */
|
char s[255]; /* Temporary string */
|
||||||
|
|
||||||
|
|
||||||
while (node != NULL)
|
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
* Print the node value...
|
* Print the node value...
|
||||||
*/
|
*/
|
||||||
@ -2821,6 +2819,9 @@ mxml_write_node(mxml_node_t *node, /* I - Node to write */
|
|||||||
* Write children...
|
* Write children...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
mxml_node_t *child; /* Current child */
|
||||||
|
|
||||||
|
|
||||||
if ((*putc_cb)('>', p) < 0)
|
if ((*putc_cb)('>', p) < 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
else
|
else
|
||||||
@ -2828,9 +2829,11 @@ mxml_write_node(mxml_node_t *node, /* I - Node to write */
|
|||||||
|
|
||||||
col = mxml_write_ws(node, p, cb, MXML_WS_AFTER_OPEN, col, putc_cb);
|
col = mxml_write_ws(node, p, cb, MXML_WS_AFTER_OPEN, col, putc_cb);
|
||||||
|
|
||||||
if ((col = mxml_write_node(node->child, p, cb, col, putc_cb,
|
for (child = node->child; child; child = child->next)
|
||||||
global)) < 0)
|
{
|
||||||
|
if ((col = mxml_write_node(child, p, cb, col, putc_cb, global)) < 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The ? and ! elements are special-cases and have no end tags...
|
* The ? and ! elements are special-cases and have no end tags...
|
||||||
@ -2985,13 +2988,6 @@ mxml_write_node(mxml_node_t *node, /* I - Node to write */
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Next node...
|
|
||||||
*/
|
|
||||||
|
|
||||||
node = node->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (col);
|
return (col);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user