XmlDataElement.cpp

Go to the documentation of this file.
00001 /*
00002 
00003 $Id$
00004 
00005 */
00006 
00007 #include "MimeTypes.h"
00008 #include "Error.h"
00009 
00010 #include "XmlDataElement.h"
00011 
00012 // Public methods.
00013 
00014 XmlDataElement::XmlDataElement(XmlAttribute *attr, const String &innerData,
00015                                XmlElement* nextChild, XmlElement *nextSibling) : XmlElement(XML_TAG_DATA, attr, innerData, nextChild, nextSibling),
00016   _mimeType(),
00017   _encoding()
00018 {
00019   String enc;
00020   int res;
00021 
00022   if (FAILED(res = attribute(XML_ATTR_MIME_TYPE, _mimeType)))
00023     _mimeType = MIME_TYPE_TEXT;
00024   if (FAILED(res = attribute(XML_ATTR_MIME_ENCODING, enc)))
00025     _encoding = MIME_ENC_NONE;
00026   else
00027     _encoding = Mime::encoding(enc);
00028 }
00029 
00030 XmlDataElement::~XmlDataElement()
00031 {
00032 }
00033 
00034 String XmlDataElement::mimeType() const
00035 {
00036   return _mimeType;
00037 }
00038 
00039 MimeEncoding XmlDataElement::encoding() const
00040 {
00041   return _encoding;
00042 }

Generated on Thu Sep 6 20:11:25 2007 for Pylon Application Platform by  doxygen 1.5.1