XML document type description. More...

Public Member Functions | |
| void | parse (in char[] str) |
| bool | empty () |
Public Attributes | |
| char[] | _name |
| char[] | _public |
| char[] | _system |
XML document type description.
Definition at line 355 of file xmlstorage.d.
| bool xmlstorage::DocType::empty | ( | ) | [inline] |
Definition at line 409 of file xmlstorage.d.
{return !_name.length;}
| void xmlstorage::DocType::parse | ( | in char[] | str ) | [inline] |
Definition at line 365 of file xmlstorage.d.
References xmlstorage::isxmlsym().
{
int i = 0;
while(i<str.length && isspace(cast(dchar)str[i])) ++i;
int start = i;
while(i<str.length && isxmlsym(str[i])) ++i;
_name = str[start..i];
while(i<str.length && isspace(cast(dchar)str[i])) ++i;
start = i;
while(i<str.length && isxmlsym(str[i])) ++i;
char[] keyword = str[start..i]; // "PUBLIC" or "SYSTEM"
while(i<str.length && isspace(cast(dchar)str[i])) ++i;
if (i<str.length && str[i]=='"' || str[i]=='\'') {
char delim = str[i];
start = ++i;
while(i<str.length && str[i]!=delim) ++i;
if (str[i] == delim)
_public = str[start..i++];
} else
_public.length = 0;
while(i<str.length && isspace(cast(dchar)str[i])) ++i;
if (i<str.length && str[i]=='"' || str[i]=='\'') {
char delim = str[i];
start = ++i;
while(i<str.length && str[i]!=delim) ++i;
if (str[i] == delim)
_system = str[start..i++];
} else
_system.length = 0;
}

| char [] xmlstorage::DocType::_name |
Definition at line 357 of file xmlstorage.d.
| char [] xmlstorage::DocType::_public |
Definition at line 360 of file xmlstorage.d.
| char [] xmlstorage::DocType::_system |
Definition at line 361 of file xmlstorage.d.
1.7.2