XMLStorage::DocType Struct Reference

XML document type description. More...

#include <xmlstorage.h>

Collaboration diagram for XMLStorage::DocType:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void parse (const char *str)
bool empty () const

Public Attributes

std::string _name
std::string _public
std::string _system


Detailed Description

XML document type description.

Definition at line 759 of file xmlstorage.h.


Member Function Documentation

void XMLStorage::DocType::parse ( const char *  str  ) 

Definition at line 692 of file xmlstorage.cpp.

00697 {
00698     while(isspace((unsigned char)*p)) ++p;
00699 
00700     const char* start = p;
00701     p = get_xmlsym_end_utf8(p);
00702     _name.assign(start, p-start);
00703 
00704     while(isspace((unsigned char)*p)) ++p;
00705 
00706     start = p;
00707     p = get_xmlsym_end_utf8(p);
00708     std::string keyword(p, p-start);    // "PUBLIC" or "SYSTEM"
00709 
00710     while(isspace((unsigned char)*p)) ++p;
00711 
00712     if (*p=='"' || *p=='\'') {
00713         char delim = *p;
00714 
00715         start = ++p;
00716         while(*p && *p!=delim) ++p;
00717 
00718         if (*p == delim)
00719             _public.assign(start, p++-start);
00720     } else
00721         _public.erase();
00722 
00723     while(isspace((unsigned char)*p)) ++p;
00724 
00725     if (*p=='"' || *p=='\'') {
00726         char delim = *p;
00727 
00728         start = ++p;
00729         while(*p && *p!=delim) ++p;
00730 
00731         if (*p == delim)

bool XMLStorage::DocType::empty (  )  const [inline]

Definition at line 770 of file xmlstorage.h.

00771 {return _name.empty();}


Member Data Documentation

std::string XMLStorage::DocType::_name

Definition at line 761 of file xmlstorage.h.

Referenced by get_html_page().

std::string XMLStorage::DocType::_public

Definition at line 764 of file xmlstorage.h.

std::string XMLStorage::DocType::_system

Definition at line 765 of file xmlstorage.h.


The documentation for this struct was generated from the following files:
Generated on Mon Aug 30 00:05:50 2010 for XMLStorage/C++ by  doxygen 1.5.4