1 // File: LDOM_XmlWriter.hxx
2 // Created: 28.06.01 10:26:52
3 // Author: Alexander GRIGORIEV
4 // Copyright: OpenCascade 2001
7 #ifndef LDOM_XmlWriter_HeaderFile
8 #define LDOM_XmlWriter_HeaderFile
10 #include <Standard_TypeDef.hxx>
17 class LDOMBasicString;
23 Standard_EXPORT LDOM_XmlWriter (FILE * aFile, const char * theEncoding= NULL);
26 Standard_EXPORT ~LDOM_XmlWriter ();
29 void SetIndentation (const Standard_Integer theIndent) { myIndent=theIndent; }
30 // Set indentation for output (by default 0)
32 Standard_EXPORT LDOM_XmlWriter& operator<< (const LDOM_Document& aDoc);
34 Standard_EXPORT LDOM_XmlWriter& operator<< (const LDOM_Node& toWrite);
35 // ostream << DOM_Node
36 // Stream out a DOM node, and, recursively, all of its children. This
37 // function is the heart of writing a DOM tree out as XML source. Give it
38 // a document node and it will do the whole thing.
42 void WriteAttribute (const LDOM_Node& theAtt);
44 LDOM_XmlWriter& operator<< (const LDOMBasicString&);
45 // Stream out LDOM String
47 inline LDOM_XmlWriter& operator<< (const LXMLCh * toWrite);
48 // Stream out a character string. Doing this requires that we first transcode
49 // to char * form in the default code page for the system
51 inline LDOM_XmlWriter& operator << (const LXMLCh aChar);
53 LDOM_XmlWriter (const LDOM_XmlWriter& anOther);
54 // Copy constructor - prohibited
56 LDOM_XmlWriter& operator = (const LDOM_XmlWriter& anOther);
57 // Assignment operator - prohibited
62 LXMLCh * myEncodingName;
63 Standard_Integer myIndent;
64 Standard_Integer myCurIndent;
65 char * myABuffer; // for WriteAttribute()
66 Standard_Integer myABufferLen; // for WriteAttribute()