Main Page   Compound List   File List   Compound Members   File Members  

xmlTools.cpp

Go to the documentation of this file.
00001 //==============================================
00002 //  copyright            : (C) 2003 by Will Stokes
00003 //==============================================
00004 //  This program is free software; you can redistribute it 
00005 //  and/or modify it under the terms of the GNU General 
00006 //  Public License as published by the Free Software 
00007 //  Foundation; either version 2 of the License, or  
00008 //  (at your option) any later version.         
00009 //
00010 //  As a special exception, Will Stokes gives permission to 
00011 //  link this program with Qt non-commercial edition, and 
00012 //  distribute the resulting executable, without including the 
00013 //  source code for the Qt non-commercial edition in the 
00014 //  source distribution. 
00015 //==============================================
00016 
00017 //Systemwide includes
00018 #include <qstring.h>
00019 
00020 //Projectwide includes
00021 #include "xmlTools.h"
00022 
00023 //==============================================
00024 QString fixXMLString( QString text )
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 }
00035 //==============================================

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