Public Member Functions | Public Attributes

XMLStorage::XMLHeader Class Reference

XMLHeader manages the content of XML file headers. More...

Collaboration diagram for XMLStorage::XMLHeader:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 XMLHeader ()
 XMLHeader (string xmlVersion, string encoding, string docType)
void print (TextWriter w)
void print (TextWriter w, bool pretty)

Public Attributes

string _version = ""
string _encoding = ""
string _docType = ""
string _additional = ""

Detailed Description

XMLHeader manages the content of XML file headers.

Definition at line 47 of file XMLHeader.cs.


Constructor & Destructor Documentation

XMLStorage::XMLHeader::XMLHeader (  ) [inline]

Definition at line 49 of file XMLHeader.cs.

References _additional, _docType, _encoding, and _version.

    {
        _version = "1.0";
        _encoding = "UTF-8";
        _docType = "";
        _additional = "";
    }
XMLStorage::XMLHeader::XMLHeader ( string  xmlVersion,
string  encoding,
string  docType 
) [inline]

Definition at line 57 of file XMLHeader.cs.

References _additional, _docType, _encoding, and _version.

    {
        _version = xmlVersion;
        _encoding = encoding;
        _docType = docType;
        _additional = "";
    }

Member Function Documentation

void XMLStorage::XMLHeader::print ( TextWriter  w ) [inline]

Definition at line 65 of file XMLHeader.cs.

Referenced by XMLStorage::XMLStreamWriter::init(), and XMLStorage::XMLDoc::write().

    {
        print(w, true);
    }
void XMLStorage::XMLHeader::print ( TextWriter  w,
bool  pretty 
) [inline]

Definition at line 70 of file XMLHeader.cs.

References _additional, _docType, _encoding, and _version.

    {
        w.Write("<?xml version=\"");
        w.Write(_version);
        w.Write("\" encoding=\"");
        w.Write(_encoding);
        w.Write("\"?>");

        if (pretty)
            w.Write('\n');

        if (_docType.Length > 0) {
            w.Write(_docType);
            w.Write('\n');
        }

        if (_additional.Length > 0) {
            w.Write(_additional);
            w.Write('\n');
        }
    }

Member Data Documentation

Definition at line 95 of file XMLHeader.cs.

Referenced by print(), XMLStorage::XMLDoc::read(), and XMLHeader().

Definition at line 94 of file XMLHeader.cs.

Referenced by print(), and XMLHeader().

Definition at line 93 of file XMLHeader.cs.

Referenced by print(), XMLStorage::XMLDoc::writeFile(), and XMLHeader().

Definition at line 92 of file XMLHeader.cs.

Referenced by print(), and XMLHeader().


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