![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cXmlWriter.h>
Public Member Functions | |
cXmlWriterV () | |
~cXmlWriterV () | |
const char * | get_CPtr () const |
size_t | get_Size () const |
virtual bool | VisitEnter (const cXmlDocument &doc) override |
Visit a document. More... | |
virtual bool | VisitExit (const cXmlDocument &doc) override |
Visit a document. More... | |
virtual bool | VisitEnter (const cXmlElement &element) override |
Visit an element. More... | |
virtual bool | VisitExit (const cXmlElement &element) override |
Visit an element. More... | |
virtual bool | Visit (const cXmlDeclaration &declaration) override |
Visit a declaration. More... | |
virtual bool | Visit (const cXmlText &text) override |
Visit a text node. More... | |
virtual bool | Visit (const cXmlComment &comment) override |
Visit a comment node. More... | |
virtual bool | Visit (const cXmlUnknown &unknown) override |
Visit an unknown node. More... | |
![]() | |
cXmlWriter (cStreamOutput *pOutput) | |
~cXmlWriter () | |
void | put_Indent (const char *pszIndent) |
const char * | get_Indent () const |
void | put_LineBreak (const char *pszLineBreak) |
const char * | get_LineBreak () const |
void | SetStreamPrinting () |
void | WriteNull () |
void | WriteLine (const char *pszData) |
void | WriteComment (const char *pszComment) |
void | WriteElementBegin (const char *pszName, const cXmlAttributeSet *pAttr=nullptr, bool bClose=false, bool bLineBreak=true) |
void | WriteElementData (const char *pszData, bool bCData=false) |
void | WriteElementEnd (const char *pszName) |
void | WriteElement1 (const char *pszName, const char *pszData) |
![]() | |
virtual | ~IXmlVisitor () |
Public Attributes | |
cStreamQueue | m_Q |
![]() | |
cStreamOutput * | m_pOutput |
Hold output we are building. More... | |
Additional Inherited Members | |
![]() | |
void | WriteIndent () |
void | WriteLineBreak () |
![]() | |
cXmlString | m_sIndent |
Tab = 4 spaces. More... | |
cXmlString | m_sLineBreak |
STR_NL. More... | |
int | m_iDepth |
Indent depth of writer. More... | |
bool | m_bElementOnOneLine |
All on the same line. "<X>sdfsdf</X>". More... | |
When constructed, the cXmlWriter is in its default "pretty printing" mode. Before calling OnVisit() you can call methods to control the printing of the XML document. After cXmlNode::OnVisit() is called, the printed document can be accessed via the CStr(), Str(), and Size() methods. cXmlWriter uses the Visitor API. @verbatim
//! cXmlWriter printer; //! printer.SetIndent( "\t" ); //! //! doc.OnVisit( &printer ); //! fprintf( stdout, "%s", printer.CStr()); //!
GrayLib::cXmlWriterV::cXmlWriterV | ( | ) |
GrayLib::cXmlWriterV::~cXmlWriterV | ( | ) |
|
inline |
Return the result.
|
inline |
Return the length of the result string.
|
overridevirtual |
Visit a comment node.
Reimplemented from GrayLib::IXmlVisitor.
|
overridevirtual |
Visit a declaration.
Reimplemented from GrayLib::IXmlVisitor.
|
overridevirtual |
Visit a text node.
Reimplemented from GrayLib::IXmlVisitor.
|
overridevirtual |
Visit an unknown node.
Reimplemented from GrayLib::IXmlVisitor.
|
overridevirtual |
Visit a document.
Reimplemented from GrayLib::IXmlVisitor.
|
overridevirtual |
Visit an element.
Reimplemented from GrayLib::IXmlVisitor.
|
overridevirtual |
Visit a document.
Reimplemented from GrayLib::IXmlVisitor.
|
overridevirtual |
Visit an element.
Reimplemented from GrayLib::IXmlVisitor.
cStreamQueue GrayLib::cXmlWriterV::m_Q |