Re: [libxml++] write_to_file_formatted problem
- From: Murray Cumming <murrayc murrayc com>
- To: iespinosa grupoikusnet com
- Cc: libxmlplusplus-general lists sourceforge net
- Subject: Re: [libxml++] write_to_file_formatted problem
- Date: Tue, 18 Mar 2008 12:59:47 +0100
On Tue, 2008-03-11 at 12:45 -0300, Ignacio Espinosa wrote:
> 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?
That shouldn't be necessary. Could you add a simple-as-possible test
case to bugzilla?
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]