Re: [Libxmlplusplus-general] write() broken, maybe fixed



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le Lundi 16 Décembre 2002 12:23, Murray Cumming a écrit :
> On Mon, 2002-12-16 at 11:57, Christophe de VIENNE wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Le Lundi 16 Décembre 2002 10:27, Murray Cumming a écrit :
> > > and at least not
> > > writing out all child nodes in the dom_build example.
> >
> > Are you 100% sure of that ?
>
> Yes. the child_of_child nodes were not written in dom_build, and it
> caused my own app (SubSubSub) to segfault when using a NULL node in
> write().
>

#include <libxml++/libxml++.h>

#include <iostream>

int main()
{
        xmlpp::DomParser parser;
        xmlpp::Node * root = parser.set_root_node("myroot", "", "");
        xmlpp::Node * tmp = root->add_child("foo");
        tmp = tmp->add_child("bar");
        tmp = tmp->add_child("bar");
        tmp = tmp->add_child("bar");
        tmp = tmp->add_child("bar");
        tmp = tmp->add_child("bar");
        tmp = tmp->add_child("bar");

        tmp->add_content("Some content");

        parser.write_to_file("tmp.xml");

        return 0;
}


this program produce the following file :
<?xml version="1.0"?>
<myroot>
<foo>
<bar>
<bar>
<bar>
<bar>
<bar>
<bar>Some content</bar>
</bar>
</bar>
</bar>
</bar>
</bar>
</foo>
</myroot>


> >  how could this produce a different result for me ?
>
> Maybe you're XML is slightly different, or not as deep. Maybe your
> version of libxml doesn't do the same checks.

Which version of libxml are you using ?
I'm personnaly using 2.4.19
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj394aQACgkQB+sU3TyOQjDKjwCfQSzb6mmV1rvtiSWGv8tTJWpN
BvIAoKV9OIyFt5CAH/ZgxwPv74CbRJy9
=SHV0
-----END PGP SIGNATURE-----





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]