Tested, but the output is not formatted :
<example>
&xml; <example1> text </ example1> <example2> text </ Example2> </ example>
instead of:
<example>
&xml;
<example1>
text
</ example1>
<example2>
text
</ Example2>
</ example>
mmmmm......I am very confused .....is not possible !!!!!!!
it seems that not exist the character LF+CR.......
----Messaggio originale----
Da: kevinstar libero it
Data: 27/01/2012 21.54
A: <kjell ahlstedt bredband net>
Cc: <libxmlplusplus-list gnome org>
Ogg: R: Re: How to use libxml++ to write a file in c ++ xml
Thank you,
I try and I will give the test results !!!!
----Messaggio originale----
Da: kjell ahlstedt bredband net
Data: 27/01/2012 16.29
A: "carlo esposito"<kevinstar libero it>
Cc: <libxmlplusplus-list gnome org>
Ogg: Re: How to use libxml++ to write a file in c ++ xml
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++.
Kjell
2012-01-26 10:35, carlo esposito skrev:Hi,
I'm using libxml + + library in C + +, and I have to write an xml file in which there is an inclusion of another xml file:
1 <? Xml version = "1.0"?>
2 <! DOCTYPE EXAMPLE SYSTEM "example.dtd" [
3 <! ENTITY xml "Extensible Markup Language">
4]>
5 <example>
6 &xml;
7 </ example>
I do not know which the method to use the library libxml++ to write the line 6: "& xml" ,I saw the classes Document, Element, ..... but I have not found any method to use to write code in my xml file line 6.
Can you help ?