|
|
|
@ -2972,6 +2972,20 @@ mxml_write_node(mxml_node_t *node, /* I - Node to write */ |
|
|
|
|
|
|
|
|
|
if ((next = current->child) == NULL) |
|
|
|
|
{ |
|
|
|
|
if (current == node) |
|
|
|
|
{ |
|
|
|
|
/*
|
|
|
|
|
* Don't traverse to sibling node if we are at the "root" node... |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
next = NULL; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
/*
|
|
|
|
|
* Try the next sibling, and continue traversing upwards as needed... |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
while ((next = current->next) == NULL) |
|
|
|
|
{ |
|
|
|
|
if (current == node || !current->parent) |
|
|
|
@ -3001,6 +3015,10 @@ mxml_write_node(mxml_node_t *node, /* I - Node to write */ |
|
|
|
|
|
|
|
|
|
col = mxml_write_ws(current, p, cb, MXML_WS_AFTER_CLOSE, col, putc_cb); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (current == node) |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|