Re: How to use libxml++ to write a file in c ++ xml



On Fri, 2012-01-27 at 16:29 +0100, Kjell Ahlstedt wrote:
> I think something is missing in xmlpp::Element. There is no way to
> create an xmlpp::EntityReference or an
> xmlpp::ProcessingInstructionNode. (They can be created when you parse
> an xml file, but I can find no way to create an xml file with those
> nodes without resorting to functions in the underlying libxml2.)
> 
> In the attached small program I have added an
> add_child_entity_reference() function. Then it's possible to write the
> file you want. I recommend that you file a bug on libxml++.

Ah, so the problem is that you can't just write &something; as text
because it would be escaped.

I would be open to adding API for this, if a patch arrives in bugzilla.



-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



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