| 1847 | |
| 1848 | |
| 1849 | bool TiXmlPrinter::Visit( const TiXmlText& text ) |
| 1850 | { |
| 1851 | if ( text.CDATA() ) |
| 1852 | { |
| 1853 | DoIndent(); |
| 1854 | buffer += "<![CDATA["; |
| 1855 | buffer += text.Value(); |
| 1856 | buffer += "]]>"; |
| 1857 | DoLineBreak(); |
| 1858 | } |
| 1859 | else if ( simpleTextPrint ) |
| 1860 | { |
| 1861 | TIXML_STRING str; |
| 1862 | TiXmlBase::EncodeString( text.ValueTStr(), &str ); |
| 1863 | buffer += str; |
| 1864 | } |
| 1865 | else |
| 1866 | { |
| 1867 | DoIndent(); |
| 1868 | TIXML_STRING str; |
| 1869 | TiXmlBase::EncodeString( text.ValueTStr(), &str ); |
| 1870 | buffer += str; |
| 1871 | DoLineBreak(); |
| 1872 | } |
| 1873 | return true; |
| 1874 | } |
| 1875 | |
| 1876 | |
| 1877 | bool TiXmlPrinter::Visit( const TiXmlDeclaration& declaration ) |