24 #ifndef __IXMLOUTSTREAM__ 25 #define __IXMLOUTSTREAM__ 28 #include "IPMUnknown.h" 30 #include "WideString.h" 32 #include "KeyValuePair.h" 65 enum { kDefaultIID = IID_IXMLOUTSTREAM };
71 enum eAttributeType { kCDATA, kNMTOKEN, kNMTOKENS, kENTITY, kENTITIES, kID, kIDREF, kIDREFS, kNOTATION, kEnumeration };
148 {
return (fName == other.fName) && (
fType == other.
fType);}
151 {Copy(other);
return *
this;}
191 Attribute(
const UTF16TextChar *n,
const UTF16TextChar *v)
211 {
return (fName == other.fName) && (
fValue == other.
fValue);}
214 {Copy(other);
return *
this;}
249 enum eKeyword { kKW_SPACE, kKW_PCDATA, kKW_ANY, kKW_EMPTY, kKW_REQUIRED, kKW_IMPLIED, kKW_FIXED, kKW_SYSTEM, kKW_PUBLIC, kKW_NDATA
271 virtual bool16
Open(
eEncodingType encoding = kUTF16, bool16 stripInvalid = kTrue) = 0;
275 virtual void Close() = 0;
280 virtual ErrorCode
Flush() = 0;
297 void DocHeader(
const UTF16TextChar* version, bool16 standalone = kTrue)
339 void DocType(
const UTF16TextChar* root,
const UTF16TextChar*
URI)
381 virtual void EndDocType(bool16 newLine = kFalse) = 0;
496 void WriteName(
const UTF16TextChar* name, bool16 newLine = kFalse)
530 void BeginEntityDecl(
const UTF16TextChar* entityName, bool16 generalEntity = kTrue, bool16 newLine = kFalse)
561 virtual void WriteLiteral(
const WideString& literal, bool16 wrapInQuotes = kFalse, bool16 newLine = kFalse) = 0;
568 void WriteLiteral(
const UTF16TextChar* literal, bool16 wrapInQuotes = kFalse, bool16 newLine = kFalse)
575 virtual void Push(
const WideString& tagName, bool16 newLine = kFalse) = 0;
581 void Push(
const UTF16TextChar* tagName, bool16 newLine = kFalse)
606 virtual ErrorCode
Pop(bool16 newLine = kFalse) = 0;
615 virtual void Write(
const WideString& data, bool16 newLine = kFalse, bool16 escape = kTrue) = 0;
624 inline void Write(
const UTF16TextChar* data, bool16 newLine = kFalse, bool16 escape = kTrue)
636 virtual void WritePlatformText(
IPMStream *data, int32 start, int32 count, bool16 newLine = kFalse, bool16 escape = kTrue) = 0;
648 void WriteEmpty(
const UTF16TextChar* tagName, bool16 newLine = kFalse)
677 void Comment(
const UTF16TextChar* comment, bool16 newLine = kFalse)
693 void BeginCData(
const UTF16TextChar* data, bool16 escape = kFalse)
699 virtual void EndCData(bool16 newLine = kTrue) = 0;
715 virtual void EndPI(bool16 newLine = kFalse) = 0;
729 virtual void Indent(
bool on) = 0;
734 virtual bool16
DoIndent(
void)
const = 0;
750 virtual void ResetEntityMap(bool16 addStandardXMLEntity = kTrue) = 0;
759 #endif //__IXMLOUTSTREAM__