| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#if !defined( INCLUDED_XML_IXML_H ) |
| 23 |
#define INCLUDED_XML_IXML_H |
| 24 |
|
| 25 |
#include "itextstream.h" |
| 26 |
#include "generic/constant.h" |
| 27 |
|
| 28 |
class XMLAttrVisitor |
| 29 |
{ |
| 30 |
public: |
| 31 |
virtual void visit( const char* name, const char* value ) = 0; |
| 32 |
}; |
| 33 |
|
| 34 |
class XMLElement |
| 35 |
{ |
| 36 |
public: |
| 37 |
virtual const char* name() const = 0; |
| 38 |
virtual const char* attribute( const char* name ) const = 0; |
| 39 |
virtual void forEachAttribute( XMLAttrVisitor& visitor ) const = 0; |
| 40 |
}; |
| 41 |
|
| 42 |
class XMLImporter : public TextOutputStream |
| 43 |
{ |
| 44 |
public: |
| 45 |
STRING_CONSTANT( Name, "XMLImporter" ); |
| 46 |
|
| 47 |
virtual void pushElement( const XMLElement& element ) = 0; |
| 48 |
virtual void popElement( const char* name ) = 0; |
| 49 |
}; |
| 50 |
|
| 51 |
class XMLExporter |
| 52 |
{ |
| 53 |
public: |
| 54 |
STRING_CONSTANT( Name, "XMLExporter" ); |
| 55 |
|
| 56 |
virtual void exportXML( XMLImporter& importer ) = 0; |
| 57 |
}; |
| 58 |
|
| 59 |
|
| 60 |
#endif |