Public Member Functions | Public Attributes

xmlstorage::DocType Class Reference

XML document type description. More...

Collaboration diagram for xmlstorage::DocType:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void parse (in char[] str)
bool empty ()

Public Attributes

char[] _name
char[] _public
char[] _system

Detailed Description

XML document type description.

Definition at line 355 of file xmlstorage.d.


Member Function Documentation

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;
    }

Here is the call graph for this function:


Member Data Documentation

Definition at line 357 of file xmlstorage.d.

Definition at line 360 of file xmlstorage.d.

Definition at line 361 of file xmlstorage.d.


The documentation for this class was generated from the following file: