| 102 | } |
| 103 | |
| 104 | void IXmlFile::WriteRoot(std::ostream &dest, bool skip_header) { |
| 105 | if (!skip_header) { |
| 106 | dest << "<?xml version='" << Version() << "' encoding='" << Encoding() |
| 107 | << "'"; |
| 108 | if (Standalone()) { |
| 109 | dest << " standalone='yes'"; |
| 110 | } |
| 111 | dest << "?>" << std::endl; |
| 112 | |
| 113 | if (!style_sheet_.empty()) { |
| 114 | dest << "<?xml-stylesheet type='text/xsl' href='" << StyleSheet() << "'?>" |
| 115 | << std::endl; |
| 116 | } |
| 117 | } |
| 118 | if (root_node_) { |
| 119 | root_node_->Write(dest, 0); |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | void IXmlFile::FileName(const std::string &filename) { filename_ = filename; } |
| 124 | |