void
xml_g_node_move_text_to_attribute (xml_GNode* node, const gchar* attrib)
{
if (!attrib || !node || !node->text || node->off == node->end) return;
xml_node_attribute_insert (node,
g_strdup (attrib),
g_strndup (node->text->str + node->off,
node->end - node->off));
memset (node->text->str + node->off, ' ', node->end - node->off);
} |
|