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/xml/xml.h"
23 class WXDLLEXPORT wxXmlIOHandlerBin
: public wxXmlIOHandler
26 wxXmlIOHandlerBin() {}
28 virtual wxXmlIOType
GetType() { return wxXML_IO_BIN
; }
29 virtual bool CanLoad(wxInputStream
& stream
);
30 virtual bool CanSave() { return TRUE
; }
32 virtual bool Load(wxInputStream
& stream
, wxXmlDocument
& doc
);
33 virtual bool Save(wxOutputStream
& stream
, const wxXmlDocument
& doc
);
36 wxString
ReadHeader(wxInputStream
& stream
);
37 void WriteHeader(wxOutputStream
& stream
, const wxString
& header
);
44 class WXDLLEXPORT wxXmlIOHandlerBinZ
: public wxXmlIOHandlerBin
47 wxXmlIOHandlerBinZ() {}
49 virtual wxXmlIOType
GetType() { return wxXML_IO_BINZ
; }
50 virtual bool CanLoad(wxInputStream
& stream
);
52 virtual bool Load(wxInputStream
& stream
, wxXmlDocument
& doc
);
53 virtual bool Save(wxOutputStream
& stream
, const wxXmlDocument
& doc
);
60 class WXDLLEXPORT wxXmlIOHandlerLibxml
: public wxXmlIOHandler
63 virtual wxXmlIOType
GetType() { return wxXML_IO_LIBXML
; }
64 virtual bool CanLoad(wxInputStream
& stream
);
65 virtual bool CanSave();
67 virtual bool Load(wxInputStream
& stream
, wxXmlDocument
& doc
);
68 virtual bool Save(wxOutputStream
& stream
, const wxXmlDocument
& doc
);
72 #endif // _WX_XMLIO_H_