#include <xmlstorage.h>


Public Member Functions | |
| HeaderlessXMLFormat (PRETTY_FLAGS pretty=PRETTY_INDENT) | |
| void | print_header (std::ostream &out, bool lf=true) const |
Public Attributes | |
| PRETTY_FLAGS | _pretty |
| const char * | _endl |
| std::string | _version |
| std::string | _encoding |
| bool | _utf8_bom |
| bool | _inhibit_header |
| DocType | _doctype |
| StyleSheetList | _stylesheets |
| int | _standalone |
Definition at line 1055 of file xmlstorage.h.
| XMLStorage::HeaderlessXMLFormat::HeaderlessXMLFormat | ( | PRETTY_FLAGS | pretty = PRETTY_INDENT ) |
[inline] |
Definition at line 1057 of file xmlstorage.h.
References XMLStorage::XMLFormat::_inhibit_header.
: XMLFormat(pretty) { _inhibit_header = true; }
| void XMLStorage::XMLFormat::print_header | ( | std::ostream & | out, |
| bool | lf = true |
||
| ) | const [inherited] |
Definition at line 806 of file xmlstorage.cpp.
References _stricmp.
Referenced by XMLStorage::XMLDoc::write(), and XMLStorage::XMLWriter::XMLWriter().
{
if (_inhibit_header)
return;
if (_utf8_bom) {
// write UTF-8 signature at file start
out.put('\xEF');
out.put('\xBB');
out.put('\xBF');
assert(!_stricmp(_encoding.c_str(), "utf-8"));
}
out << "<?xml version=\"" << _version << "\" encoding=\"" << _encoding << "\"";
if (_standalone != -1)
out << " standalone=\"yes\"";
out << "?>";
if (lf)
out << _endl;
if (!_doctype.empty()) {
out << "<!DOCTYPE " << _doctype._name;
if (!_doctype._public.empty()) {
out << " PUBLIC \"" << _doctype._public << '"';
if (lf)
out << _endl;
out << " \"" << _doctype._system << '"';
} else if (!_doctype._system.empty())
out << " SYSTEM \"" << _doctype._system << '"';
out << "?>";
if (lf)
out << _endl;
}
for(StyleSheetList::const_iterator it=_stylesheets.begin(); it!=_stylesheets.end(); ++it) {
it->print(out);
if (lf)
out << _endl;
}
/* if (!_additional.empty()) {
out << _additional;
if (lf)
out << _endl;
} */
}

DocType XMLStorage::XMLFormat::_doctype [inherited] |
Definition at line 1046 of file xmlstorage.h.
Referenced by get_html_page(), HTMLFormat::HTMLFormat(), and XMLStorage::ParseContext::process_next().
std::string XMLStorage::XMLFormat::_encoding [inherited] |
Definition at line 1042 of file xmlstorage.h.
const char* XMLStorage::XMLFormat::_endl [inherited] |
Definition at line 1039 of file xmlstorage.h.
Referenced by XMLStorage::XMLReaderBase::get_endl(), XMLStorage::ParseContext::process_next(), XMLStorage::XMLDoc::read(), and XMLStorage::XMLWriter::~XMLWriter().
bool XMLStorage::XMLFormat::_inhibit_header [inherited] |
Definition at line 1044 of file xmlstorage.h.
Referenced by HeaderlessXMLFormat().
PRETTY_FLAGS XMLStorage::XMLFormat::_pretty [inherited] |
Definition at line 1038 of file xmlstorage.h.
Referenced by HTMLFormat::HTMLFormat().
int XMLStorage::XMLFormat::_standalone [inherited] |
Definition at line 1052 of file xmlstorage.h.
StyleSheetList XMLStorage::XMLFormat::_stylesheets [inherited] |
Definition at line 1048 of file xmlstorage.h.
Referenced by XMLStorage::ParseContext::process_next().
bool XMLStorage::XMLFormat::_utf8_bom [inherited] |
Definition at line 1043 of file xmlstorage.h.
Referenced by XMLStorage::ParseContext::process_next(), and XMLStorage::ParseContext::read_bom().
std::string XMLStorage::XMLFormat::_version [inherited] |
Definition at line 1041 of file xmlstorage.h.
1.7.2