1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxXmlIOHandler - XML I/O classes
4 // Author: Vaclav Slavik
7 // Copyright: (c) 2000 Vaclav Slavik
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
15 #pragma interface "xmlio.h"
19 #include "wx/string.h"
20 #include "wx/xrc/xml.h"
23 class WXXMLDLLEXPORT wxXmlIOHandlerExpat
: public wxXmlIOHandler
26 virtual wxXmlIOType
GetType() { return wxXML_IO_EXPAT
; }
27 virtual bool CanLoad(wxInputStream
& stream
);
28 virtual bool CanSave() { return FALSE
; }
30 virtual bool Load(wxInputStream
& stream
, wxXmlDocument
& doc
);
31 virtual bool Save(wxOutputStream
& WXUNUSED(stream
), const wxXmlDocument
& WXUNUSED(doc
))
36 class WXXMLDLLEXPORT wxXmlIOHandlerWriter
: public wxXmlIOHandler
39 virtual wxXmlIOType
GetType() { return wxXML_IO_TEXT_OUTPUT
; }
40 virtual bool CanLoad(wxInputStream
& WXUNUSED(stream
)) { return FALSE
; }
41 virtual bool CanSave() { return TRUE
; }
43 virtual bool Load(wxInputStream
& WXUNUSED(stream
), wxXmlDocument
& WXUNUSED(doc
))
45 virtual bool Save(wxOutputStream
& stream
, const wxXmlDocument
& doc
);
49 class WXXMLDLLEXPORT wxXmlIOHandlerBin
: public wxXmlIOHandler
52 wxXmlIOHandlerBin() {}
54 virtual wxXmlIOType
GetType() { return wxXML_IO_BIN
; }
55 virtual bool CanLoad(wxInputStream
& stream
);
56 virtual bool CanSave() { return TRUE
; }
58 virtual bool Load(wxInputStream
& stream
, wxXmlDocument
& doc
);
59 virtual bool Save(wxOutputStream
& stream
, const wxXmlDocument
& doc
);
62 wxString
ReadHeader(wxInputStream
& stream
);
63 void WriteHeader(wxOutputStream
& stream
, const wxString
& header
);
70 class WXXMLDLLEXPORT wxXmlIOHandlerBinZ
: public wxXmlIOHandlerBin
73 wxXmlIOHandlerBinZ() {}
75 virtual wxXmlIOType
GetType() { return wxXML_IO_BINZ
; }
76 virtual bool CanLoad(wxInputStream
& stream
);
78 virtual bool Load(wxInputStream
& stream
, wxXmlDocument
& doc
);
79 virtual bool Save(wxOutputStream
& stream
, const wxXmlDocument
& doc
);
85 #endif // _WX_XMLIO_H_