Main Page   Compound List   File List   Compound Members   File Members  

xmlTools.cpp File Reference

#include <qstring.h>
#include "xmlTools.h"

Go to the source code of this file.

Functions

QString fixXMLString (QString text)
 Fix strings before exporting to XML such that & becomes &, etc...


Function Documentation

QString fixXMLString QString  text  ) 
 

Fix strings before exporting to XML such that & becomes &, etc...

Definition at line 24 of file xmlTools.cpp.

Referenced by Album::exportToXML(), Photo::exportToXML(), and Subalbum::exportToXML().

00025 {
00026   //the following checks are necessary before exporting
00027   //strings to XML. see http://hdf.ncsa.uiuc.edu/HDF5/XML/xml_escape_chars.html for details
00028   text.replace("&", "&amp;");
00029   text.replace("\"","&quot;");
00030   text.replace("'", "&apos;");
00031   text.replace("<", "&lt;");
00032   text.replace(">", "&gt;");
00033   return text;
00034 }


Generated on Tue Jun 10 23:41:22 2003 for AlbumShaper by doxygen 1.3.1