[libxml++] write_to_file_formatted problem
- From: Ignacio Espinosa <iespinosa grupoikusnet com>
- To: libxmlplusplus-general lists sourceforge net
- Subject: [libxml++] write_to_file_formatted problem
- Date: Tue, 11 Mar 2008 12:45:43 -0300
Hi all,
I'm reading a xml file, adding new nodes and then writting it to another
xml file with write_to_file_formatted, that's when came the problem up.
The result looks like this (only with the new nodes):
<newnode1><newnode2>text2</newnode2><newnode3>text3</newnode3></newnode1>
The rest of de file looks just fine.
I've trying with libxml++2.20 (Debian Testing version) and Libxml++2.22.
Here is how I added the nodes:
Element *tmp_elem = root_node->add_child("newnode1");
Node *tmp_node = dynamic_cast<Node*>(tmp_elem);
tmp_elem = tmp_node->add_child("newnode2");
tmp_elem->set_child_text("newtext2");
tmp_elem = tmp_node->add_child("newnode3");
tmp_elem->set_child_text("newtext3");
---
I don't know if I'm doing something wrong, or it's some libxml++ or
libxml (xmlSaveFormatFileEnc) bug.
How can I fix this problem? Do I have to manually insert whitespaces?
Thanks
ignacio.
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]