PDA

View Full Version : interpreting "



peace_comp
20th May 2008, 20:09
Hi..
I would like to generate an Xml file from a text file that contains data ..
But I have a problem with how to interpret the " inside an xml text:
for example :



QFile coordinates("coordinates.xml") ;
coordinates.open(QIODevice::WriteOnly | QIODevice::Text);
coordinates.write("<?xml version="1.0+" encoding="utf-8" ?>");

<?xml version="1.0+" encoding="utf-8" ?> contains many " that beaks the String I wanna put !!! So r there a way to interpret that " ..or to put its asci code ..

if some one could help !! thanks

jpn
20th May 2008, 22:35
Escape character (http://en.wikipedia.org/wiki/Escape_character)

peace_comp
20th May 2008, 23:07
Oups i find how .. I could just use \" ... thanks