InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IXMLOutStream Class Referenceabstract

#include <IXMLOutStream.h>

Inheritance diagram for IXMLOutStream:
IPMUnknownCPMUnknown< IXMLOutStream >CXMLOutStream

Classes

class  Attribute
 
class  AttributeDfn
 

Public Types

enum  { kDefaultIID = IID_IXMLOUTSTREAM }
 
enum  eEncodingType { kUTF8, kUTF16, kShiftJIS }
 
enum  eAttributeType {
  kCDATA, kNMTOKEN, kNMTOKENS, kENTITY,
  kENTITIES, kID, kIDREF, kIDREFS,
  kNOTATION, kEnumeration
}
 
enum  eAttributeQualifier { kQNone, kQRequired, kQImplied, kQFixed }
 
enum  eContentParticleSeparator { kNone, kChoice, kSequence }
 
enum  eContentParticleOccurrence { kExactlyOnce, kOneOrMore, kZeroOrMore, kOptional }
 
enum  eKeyword {
  kKW_SPACE, kKW_PCDATA, kKW_ANY, kKW_EMPTY,
  kKW_REQUIRED, kKW_IMPLIED, kKW_FIXED, kKW_SYSTEM,
  kKW_PUBLIC, kKW_NDATA
}
 
typedef K2Vector< AttributeDfnAttributeDfnList
 
typedef K2Vector< AttributeAttributeList
 
typedef KeyValuePair
< UTF16TextChar, const
WideString * > 
Entity
 
typedef K2Vector< EntityEntityMap
 

Public Member Functions

virtual bool16 Open (eEncodingType encoding=kUTF16, bool16 stripInvalid=kTrue)=0
 
virtual void Close ()=0
 
virtual ErrorCode Flush ()=0
 
virtual void DocHeader (const WideString &version, bool16 standalone=kTrue)=0
 
void DocHeader (const UTF16TextChar *version, bool16 standalone=kTrue)
 
virtual void TextDeclaration (const WideString &version)=0
 
void TextDeclaration (const UTF16TextChar *version)
 
virtual void DocType (const WideString &root, const WideString &URI)=0
 
void DocType (const UTF16TextChar *root, const WideString &URI)
 
void DocType (const WideString &root, const UTF16TextChar *URI)
 
void DocType (const UTF16TextChar *root, const UTF16TextChar *URI)
 
virtual void DocType (const WideString &root, const WideString &name, const WideString &URI)=0
 
virtual void BeginDocType (const WideString &root, bool16 newLine=kFalse)=0
 
void BeginDocType (const UTF16TextChar *root, bool16 newLine=kFalse)
 
virtual void BeginDocType (const WideString &root, const WideString &systemIDLiteral, bool16 newLine=kFalse)=0
 
virtual void BeginDocType (const WideString &root, const WideString &publicIDLiteral, const WideString &systemIDLiteral, bool16 newLine=kFalse)=0
 
virtual void EndDocType (bool16 newLine=kFalse)=0
 
virtual void WriteAttributeList (const WideString &elementName, const AttributeDfnList &dfns, bool16 newLine=kFalse)=0
 
void WriteAttributeList (const UTF16TextChar *elementName, const AttributeDfnList &dfns, bool16 newLine=kFalse)
 
virtual void BeginElementTypeDecl (const WideString &elementName, bool16 newLine=kFalse)=0
 
void BeginElementTypeDecl (const UTF16TextChar *elementName, bool16 newLine=kFalse)
 
virtual void EndElementTypeDecl (bool16 newLine=kFalse)=0
 
virtual void BeginContentModelDecl (eContentParticleSeparator separator=kNone, bool16 newLine=kFalse)=0
 
virtual void EndContentModelDecl (eContentParticleOccurrence occurrence=kExactlyOnce, bool16 newLine=kFalse)=0
 
virtual void BeginMixedContentModelDecl (eContentParticleSeparator separator=kNone, bool16 newLine=kFalse)=0
 
virtual void EndMixedContentModelDecl (bool16 writeOccurrence=kTrue, bool16 newLine=kFalse)=0
 
virtual void WriteSeparator (eContentParticleSeparator separator, bool16 newLine=kFalse)=0
 
virtual void WriteContentParticle (const WideString &contentParticleName, eContentParticleOccurrence occurrence=kExactlyOnce, bool16 newLine=kFalse)=0
 
void WriteContentParticle (const UTF16TextChar *contentParticleName, eContentParticleOccurrence occurrence=kExactlyOnce, bool16 newLine=kFalse)
 
virtual void WriteKeyword (eKeyword keyword, bool16 newLine=kFalse)=0
 
virtual void BeginAttListDecl (const WideString &elementName, bool16 newLine=kFalse)=0
 
void BeginAttListDecl (const UTF16TextChar *elementName, bool16 newLine=kFalse)
 
virtual void EndAttListDecl (bool16 newLine=kFalse)=0
 
virtual void WriteName (const WideString &name, bool16 newLine=kFalse)=0
 
void WriteName (const UTF16TextChar *name, bool16 newLine=kFalse)
 
virtual void WriteAttributeType (eAttributeType attType, bool16 newLine=kFalse)=0
 
virtual void WriteAttributeValue (const WideString &attValue, bool16 newLine=kFalse)=0
 
void WriteAttributeValue (const UTF16TextChar *attValue, bool16 newLine=kFalse)
 
virtual void BeginEntityDecl (const WideString &entityName, bool16 generalEntity=kTrue, bool16 newLine=kFalse)=0
 
void BeginEntityDecl (const UTF16TextChar *entityName, bool16 generalEntity=kTrue, bool16 newLine=kFalse)
 
virtual void EndEntityDecl (bool16 newLine=kFalse)=0
 
virtual void BeginNotationDecl (const WideString &notationName, bool16 newLine=kFalse)=0
 
void BeginNotationDecl (const UTF16TextChar *notationName, bool16 newLine=kFalse)
 
virtual void EndNotationDecl (bool16 newLine=kFalse)=0
 
virtual void WriteLiteral (const WideString &literal, bool16 wrapInQuotes=kFalse, bool16 newLine=kFalse)=0
 
void WriteLiteral (const UTF16TextChar *literal, bool16 wrapInQuotes=kFalse, bool16 newLine=kFalse)
 
virtual void Push (const WideString &tagName, bool16 newLine=kFalse)=0
 
void Push (const UTF16TextChar *tagName, bool16 newLine=kFalse)
 
virtual void PushWithAttributes (const WideString &tagName, const AttributeList &attrs, bool16 newLine=kFalse)=0
 
void PushWithAttributes (const UTF16TextChar *tagName, const AttributeList &attrs, bool16 newLine=kFalse)
 
virtual ErrorCode Pop (bool16 newLine=kFalse)=0
 
virtual void Write (const WideString &data, bool16 newLine=kFalse, bool16 escape=kTrue)=0
 
void Write (const UTF16TextChar *data, bool16 newLine=kFalse, bool16 escape=kTrue)
 
virtual void WritePlatformText (IPMStream *data, int32 start, int32 count, bool16 newLine=kFalse, bool16 escape=kTrue)=0
 
virtual void WriteEmpty (const WideString &tagName, bool16 newLine=kFalse)=0
 
void WriteEmpty (const UTF16TextChar *tagName, bool16 newLine=kFalse)
 
virtual void WriteEmptyWithAttributes (const WideString &tag, const AttributeList &attrs, bool16 newLine=kFalse)=0
 
void WriteEmptyWithAttributes (const UTF16TextChar *tag, const AttributeList &attrs, bool16 newLine=kFalse)
 
virtual void Comment (const WideString &comment, bool16 newLine=kFalse)=0
 
void Comment (const UTF16TextChar *comment, bool16 newLine=kFalse)
 
virtual void BeginCData (const WideString &data, bool16 escape=kFalse)=0
 
void BeginCData (const UTF16TextChar *data, bool16 escape=kFalse)
 
virtual void EndCData (bool16 newLine=kTrue)=0
 
virtual void BeginPI (const WideString &piTarget, const WideString &piData, bool16 newLine=kFalse, bool16 escape=kFalse)=0
 
virtual void EndPI (bool16 newLine=kFalse)=0
 
virtual void IndentLevel (bool increase)=0
 
virtual void Indent (bool on)=0
 
virtual bool16 DoIndent (void) const =0
 
virtual void WriteIndent (void)=0
 
virtual bool CheckStatus ()=0
 
virtual void ResetEntityMap (bool16 addStandardXMLEntity=kTrue)=0
 
virtual void AppendEntityMap (EntityMap &map)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Represents an XML based stream onto a file or memory; you'll find IXMLStreamUtils to create one of these stream types.

The methods that write to the stream will use the proper encoding based on the current setting All methods expect data to be in the form of unicode strings with 16 bit chars.

!!!!!!!!! For MachO char literals 'L' construct 4 (count 'em 4!) byte char strings !!!!!!! !!!!!!!!! For MachO char literals 'L' construct 4 (count 'em 4!) byte char strings !!!!!!!

A 16-bit string literal can be constucted in code using 'L' such as:


    myStream->DocHeader((ConstWString)L"1.0");      // compiles but does the wrong thing!!! You can't cast an elephant to be a mouse!!!
    myStream->DocHeader(WideString(L"1.0"));        // preferred method - convert to a WideString, which method also accepts

    myStream->DocHeader(L"1.0");                        // compiler does the above conversion for you - but it's better to do it manually

  

For more information see these parts of the XML 1.0 specification: prolog sections, document-types doc-type declarations, comments, processing instructions and CDATA sections.

Member Typedef Documentation

Used to represent a list of AttributeDfn objects for an IXMLOutStream

Used to represent a list of Attribute objects for an IXMLOutStream

Member Enumeration Documentation

Enumeration of supported attribute qualifiers.

Enumeration of supported attribute types.

Enumeration of content particle occurrences

Enumeration of content particle separators
Enumerator
kNone 

no separator

kChoice 

choice |

kSequence 

sequence ,

Enumeration of supported encoding types.

Enumeration of keywords

Member Function Documentation

virtual void IXMLOutStream::AppendEntityMap (EntityMapmap)
pure virtual

Add character entity mappings ('&' to '&', '<' to '<' etc) New mappings overwrite existing ones for the same character.

Implemented in CXMLOutStream.

virtual void IXMLOutStream::BeginAttListDecl (const WideStringelementName,
bool16 newLine = kFalse 
)
pure virtual

Begin an ATTLIST declaration. i.e. "<!ATTLIST elementName"

Parameters
elementNamename of the element for the attributes
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::BeginAttListDecl (const UTF16TextChar * elementName,
bool16 newLine = kFalse 
)
inline

Begin an ATTLIST declaration. i.e. "<!ATTLIST elementName"

Parameters
elementNamename of the element for the attributes
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::BeginCData (const WideStringdata,
bool16 escape = kFalse 
)
pure virtual

Begin a CData section. Data and subsequent calls to Write() will escape entities or not depending on bool.

Parameters
datacontent to write into CDATA section
escapekTrue if standard entities to be escaped, kFalse otherwise

Implemented in CXMLOutStream.

void IXMLOutStream::BeginCData (const UTF16TextChar * data,
bool16 escape = kFalse 
)
inline

Begin a CData section. Data and subsequent calls to Write() will escape entities or not depending on bool.

Parameters
datacontent to write into CDATA section
escapekTrue if standard entities to be escaped, kFalse otherwise
virtual void IXMLOutStream::BeginContentModelDecl (eContentParticleSeparator separator = kNone,
bool16 newLine = kFalse 
)
pure virtual

Begin a content model declaration. i.e. "("

Parameters
separatormay optionally prepend a separator. i.e. ", (" Use kNone to add nothing
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::BeginDocType (const WideStringroot,
bool16 newLine = kFalse 
)
pure virtual

Begin definition of an Internal DTD with root element.

Parameters
rootname of the root element, e.g. article
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::BeginDocType (const UTF16TextChar * root,
bool16 newLine = kFalse 
)
inline

Begin definition of an Internal DTD with root element.

Parameters
rootname of the root element, e.g. article
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::BeginDocType (const WideStringroot,
const WideStringsystemIDLiteral,
bool16 newLine = kFalse 
)
pure virtual

Begin definition of an external SYSTEM DTD with root element

Parameters
rootname of the root element, e.g. article
systemIDLiteralSYSTEM ID literal
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::BeginDocType (const WideStringroot,
const WideStringpublicIDLiteral,
const WideStringsystemIDLiteral,
bool16 newLine = kFalse 
)
pure virtual

Begin definition of an external PUBLIC DTD with root element

Parameters
rootname of the root element, e.g. article
publicIDLiteralPUBLIC ID literal
systemIDLiteralSYSTEM ID literal
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::BeginElementTypeDecl (const WideStringelementName,
bool16 newLine = kFalse 
)
pure virtual

Begin an element type declaration. i.e. "<!ELEMENT elementName "

Parameters
elementNamespecifies name of element
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::BeginElementTypeDecl (const UTF16TextChar * elementName,
bool16 newLine = kFalse 
)
inline

Begin an element type declaration. i.e. "<!ELEMENT elementName "

Parameters
elementNamespecifies name of element
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::BeginEntityDecl (const WideStringentityName,
bool16 generalEntity = kTrue,
bool16 newLine = kFalse 
)
pure virtual

Begin an ENTITY declaration. i.e. "<!ENTITY entityName " or "<!ENTITY % entityName "

Parameters
entityNamename of the entity
generalEntitykTrue to write a general entity; kFalse to write parameter entity
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::BeginEntityDecl (const UTF16TextChar * entityName,
bool16 generalEntity = kTrue,
bool16 newLine = kFalse 
)
inline

Begin an ENTITY declaration. i.e. "<!ENTITY entityName " or "<!ENTITY % entityName "

Parameters
entityNamename of the entity
generalEntitykTrue to write a general entity; kFalse to write parameter entity
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::BeginMixedContentModelDecl (eContentParticleSeparator separator = kNone,
bool16 newLine = kFalse 
)
pure virtual

Begin a mixed content model declaration. i.e. "(#PCDATA"

Parameters
separatormay optionally prepend a separator. i.e. ", (#PCDATA" Use kNone to add nothing
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::BeginNotationDecl (const WideStringnotationName,
bool16 newLine = kFalse 
)
pure virtual

Begin a NOTATION declaration. i.e. "<!NOTATION notationName "

Parameters
notationNamename of the notation
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::BeginNotationDecl (const UTF16TextChar * notationName,
bool16 newLine = kFalse 
)
inline

Begin a NOTATION declaration. i.e. "<!NOTATION notationName "

Parameters
notationNamename of the notation
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::BeginPI (const WideStringpiTarget,
const WideStringpiData,
bool16 newLine = kFalse,
bool16 escape = kFalse 
)
pure virtual

Begin a Processing Instruction section. until EndCdata() is called. NewLine after the tag if necessary.

Parameters
piTargetapplication to which the instruction is directed
piDatadata to pass through to target application
newLinewhether to write new-line into stream after this content
escapekTrue if standard entities to be escaped, kFalse otherwise

Implemented in CXMLOutStream.

virtual bool IXMLOutStream::CheckStatus ()
pure virtual

Utility method to check status flag on this interface

Returns
bool status flag, kSuccess if all going well

Implemented in CXMLOutStream.

virtual void IXMLOutStream::Close ()
pure virtual

must be called when done with stream to ensure final flush of stream content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::Comment (const WideStringcomment,
bool16 newLine = kFalse 
)
pure virtual

Comment will output a comment at the current stream position with no escaping of entities.

Parameters
commentspecifies comment data to write out
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::Comment (const UTF16TextChar * comment,
bool16 newLine = kFalse 
)
inline

Comment will output a comment at the current stream position with no escaping of entities.

Parameters
commentspecifies comment data to write out
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::DocHeader (const WideStringversion,
bool16 standalone = kTrue 
)
pure virtual

Write the XML header for this document.

Parameters
versionXML version (e.g. 1.0 is expected)
standalonespecifies whether the document should be described as standalone="yes" or not

Implemented in CXMLOutStream.

void IXMLOutStream::DocHeader (const UTF16TextChar * version,
bool16 standalone = kTrue 
)
inline

Write the XML header for this document.

Parameters
versionXML version (e.g. 1.0 is expected)
standalonespecifies whether the document should be described as standalone="yes" or not
virtual void IXMLOutStream::DocType (const WideStringroot,
const WideStringURI 
)
pure virtual

Write a SYSTEM DocType with root element and DTD pointed to by URI.

Parameters
rootname of the root element, e.g. article
URIidentifier for the document type

Implemented in CXMLOutStream.

void IXMLOutStream::DocType (const UTF16TextChar * root,
const WideStringURI 
)
inline

Write a SYSTEM DocType with root element and DTD pointed to by URI.

Parameters
rootname of the root element, e.g. article
URIidentifier for the document type
void IXMLOutStream::DocType (const WideStringroot,
const UTF16TextChar * URI 
)
inline

Write a SYSTEM DocType with root element and DTD pointed to by URI.

Parameters
rootname of the root element, e.g. article
URIidentifier for the document type
void IXMLOutStream::DocType (const UTF16TextChar * root,
const UTF16TextChar * URI 
)
inline

Write a SYSTEM DocType with root element and DTD pointed to by URI.

Parameters
rootname of the root element, e.g. article
URIidentifier for the document type
virtual void IXMLOutStream::DocType (const WideStringroot,
const WideStringname,
const WideStringURI 
)
pure virtual

Write a PUBLIC DocType with root element and DTD pointed to by URI and a name of public DTD.

Parameters
rootname of the root element, e.g. article
namepublic identifier
URIidentifier for the document type

Implemented in CXMLOutStream.

virtual bool16 IXMLOutStream::DoIndent (void ) const
pure virtual

return whether indent is on or not

Returns
bool16 kTrue if indent is on; kFalse otherwise

Implemented in CXMLOutStream.

virtual void IXMLOutStream::EndAttListDecl (bool16 newLine = kFalse)
pure virtual

End an ATTLIST declaration. i.e. ">"

Parameters
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::EndCData (bool16 newLine = kTrue)
pure virtual

End a CDataSection, with a newLine after if neccesary.

Parameters
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::EndContentModelDecl (eContentParticleOccurrence occurrence = kExactlyOnce,
bool16 newLine = kFalse 
)
pure virtual

End a content model declaration. i.e. ")+"

Parameters
occurrenceoccurrence of the content model
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::EndDocType (bool16 newLine = kFalse)
pure virtual

Ends definition of an Internal DTD.

Parameters
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::EndElementTypeDecl (bool16 newLine = kFalse)
pure virtual

End an element type declaration. i.e. ">"

Parameters
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::EndEntityDecl (bool16 newLine = kFalse)
pure virtual

End an ENTITY declaration. i.e. ">"

Parameters
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::EndMixedContentModelDecl (bool16 writeOccurrence = kTrue,
bool16 newLine = kFalse 
)
pure virtual

End a mixed content model declaration. i.e. ")*"

Parameters
writeOccurrencewhether to write the "*" occurrence. This should be kFalse only when the PCDATA is the only content particle in a mixed content model
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::EndNotationDecl (bool16 newLine = kFalse)
pure virtual

End a NOTATION declaration. i.e. ">"

Parameters
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::EndPI (bool16 newLine = kFalse)
pure virtual

End a Processing Instruction, with a newLine after if neccesary

Parameters
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual ErrorCode IXMLOutStream::Flush ()
pure virtual

force all pending writes

Returns
kSuccess if Flush succeeds, kFailure otherwise

Implemented in CXMLOutStream.

virtual void IXMLOutStream::Indent (bool on)
pure virtual

Formatting related; enable indent. If on, each output operation is indented based on the current indent level

Parameters
onspecifies whether to turn indenting on or off

Implemented in CXMLOutStream.

virtual void IXMLOutStream::IndentLevel (bool increase)
pure virtual

Formatting related; indent level will determine how much to indent each write to the output stream, only effective if Indent is on

Parameters
increasespecifies whether to increase indent level or not

Implemented in CXMLOutStream.

virtual bool16 IXMLOutStream::Open (eEncodingType encoding = kUTF16,
bool16 stripInvalid = kTrue 
)
pure virtual

Must be called before any other methods to initialize stream.

Parameters
encodingkUTF16 is Big or Litle Endian, depending on platform
stripInvaliddetermines if invalid Unicode chars are stripped from the output or converted to processing instructions that contain their hexidecimal equivalent
Returns
kTrue if stream could be opened, kFalse otherwise

Implemented in CXMLOutStream.

virtual ErrorCode IXMLOutStream::Pop (bool16 newLine = kFalse)
pure virtual

Use to write the end tag for the top tag on the stack and to remove it from the stack

Parameters
newLinewhether to write new-line into stream after this content
Returns
kTrue if stream IO succeeds, kFalse otherwise

Implemented in CXMLOutStream.

virtual void IXMLOutStream::Push (const WideStringtagName,
bool16 newLine = kFalse 
)
pure virtual

Use to write a new tag.

Parameters
tagNamespecifies name of tag
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::Push (const UTF16TextChar * tagName,
bool16 newLine = kFalse 
)
inline

Use to write a new tag.

Parameters
tagNamespecifies name of tag
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::PushWithAttributes (const WideStringtagName,
const AttributeListattrs,
bool16 newLine = kFalse 
)
pure virtual

Use to write a new tag with attributes.

Parameters
tagNamespecifies name of tag
attrslist of its attributes
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::PushWithAttributes (const UTF16TextChar * tagName,
const AttributeListattrs,
bool16 newLine = kFalse 
)
inline

Use to write a new tag with attributes.

Parameters
tagNamespecifies name of tag
attrslist of its attributes
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::ResetEntityMap (bool16 addStandardXMLEntity = kTrue)
pure virtual

Clear the character entity table

Parameters
addStandardXMLEntityspecifies whether to add standard XML entity.

Implemented in CXMLOutStream.

virtual void IXMLOutStream::TextDeclaration (const WideStringversion)
pure virtual

write the XML text declaration. See XML 1.0 spec 20001006, section 4.3.1

Parameters
versionXML version (e.g. 1.0 is expected)

Implemented in CXMLOutStream.

void IXMLOutStream::TextDeclaration (const UTF16TextChar * version)
inline

write the XML text declaration. See XML 1.0 spec 20001006, section 4.3.1

Parameters
versionXML version (e.g. 1.0 is expected)
virtual void IXMLOutStream::Write (const WideStringdata,
bool16 newLine = kFalse,
bool16 escape = kTrue 
)
pure virtual

Write will output data to stream at current position, and escape the standard 5 entities, unless a CData or PI section has been started with escaping off.

Parameters
dataspecifies content to write out
escapekTrue if data to be escaped, kFalse otherwise
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::Write (const UTF16TextChar * data,
bool16 newLine = kFalse,
bool16 escape = kTrue 
)
inline

Write will output data to stream at current position, and escape the standard 5 entities, unless a CData or PI section has been started with escaping off.

Parameters
dataspecifies content to write out
escapekTrue if data to be escaped, kFalse otherwise
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::WriteAttributeList (const WideStringelementName,
const AttributeDfnListdfns,
bool16 newLine = kFalse 
)
pure virtual

Write a declaration for an ATTLIST..

Parameters
elementNamename of the element, e.g. document
attrDfnslist of its attribute definitions
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::WriteAttributeList (const UTF16TextChar * elementName,
const AttributeDfnListdfns,
bool16 newLine = kFalse 
)
inline

Write a declaration for an ATTLIST..

Parameters
elementNamename of the element, e.g. document
attrDfnslist of its attribute definitions
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::WriteAttributeType (eAttributeType attType,
bool16 newLine = kFalse 
)
pure virtual

Write an attribute type. i.e. " CDATA"

Parameters
attTypeattribute type to write
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::WriteAttributeValue (const WideStringattValue,
bool16 newLine = kFalse 
)
pure virtual

Write an attribute value. i.e. ""true""

Parameters
attValueattribute value to write
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::WriteAttributeValue (const UTF16TextChar * attValue,
bool16 newLine = kFalse 
)
inline

Write an attribute value. i.e. ""true""

Parameters
attValueattribute value to write
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::WriteContentParticle (const WideStringcontentParticleName,
eContentParticleOccurrence occurrence = kExactlyOnce,
bool16 newLine = kFalse 
)
pure virtual

Write a content particle. i.e. "contentParticleName+"

Parameters
contentParticleNamecontent particle name
occurrencecontent particle occurrence
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::WriteContentParticle (const UTF16TextChar * contentParticleName,
eContentParticleOccurrence occurrence = kExactlyOnce,
bool16 newLine = kFalse 
)
inline

Write a content particle. i.e. "contentParticleName+"

Parameters
contentParticleNamecontent particle name
occurrencecontent particle occurrence
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::WriteEmpty (const WideStringtagName,
bool16 newLine = kFalse 
)
pure virtual

Write an empty tag such as '<foo/>'

Parameters
tagNamespecifies name of tag to write
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::WriteEmpty (const UTF16TextChar * tagName,
bool16 newLine = kFalse 
)
inline

Write an empty tag such as '<foo/>'

Parameters
tagNamespecifies name of tag to write
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::WriteEmptyWithAttributes (const WideStringtag,
const AttributeListattrs,
bool16 newLine = kFalse 
)
pure virtual

Write an empty tag with attributes such as '<foo bar = true/>'.

Parameters
tagspecifies tag name
attrslist of attributes to write out
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::WriteEmptyWithAttributes (const UTF16TextChar * tag,
const AttributeListattrs,
bool16 newLine = kFalse 
)
inline

Write an empty tag with attributes such as '<foo bar = true/>'.

Parameters
tagspecifies tag name
attrslist of attributes to write out
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::WriteIndent (void )
pure virtual

output the current indent

Implemented in CXMLOutStream.

virtual void IXMLOutStream::WriteKeyword (eKeyword keyword,
bool16 newLine = kFalse 
)
pure virtual

Write a keyword. i.e. "#PCDATA"

Parameters
keywordkeyword to write
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::WriteLiteral (const WideStringliteral,
bool16 wrapInQuotes = kFalse,
bool16 newLine = kFalse 
)
pure virtual

Write a literal enclosed in quotes. i.e. ""literal""

Parameters
literalliteral to write
wrapInQuoteswhether to wrap the literal in quotes
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::WriteLiteral (const UTF16TextChar * literal,
bool16 wrapInQuotes = kFalse,
bool16 newLine = kFalse 
)
inline

Write a literal enclosed in quotes. i.e. ""literal""

Parameters
literalliteral to write
wrapInQuoteswhether to wrap the literal in quotes
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::WriteName (const WideStringname,
bool16 newLine = kFalse 
)
pure virtual

Write a name. i.e. "name"

Parameters
namename to write
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

void IXMLOutStream::WriteName (const UTF16TextChar * name,
bool16 newLine = kFalse 
)
inline

Write a name. i.e. "name"

Parameters
namename to write
newLinewhether to write new-line into stream after this content
virtual void IXMLOutStream::WritePlatformText (IPMStreamdata,
int32 start,
int32 count,
bool16 newLine = kFalse,
bool16 escape = kTrue 
)
pure virtual

WritePlatformText will output data to stream at current position, and escape the standard 5 entities, unless a CData or PI section has been started with escaping off.

Parameters
datastream containing platform characters
startstream offset of the first character to write
countthe number of characters to write
escapekTrue if data to be escaped, kFalse otherwise
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.

virtual void IXMLOutStream::WriteSeparator (eContentParticleSeparator separator,
bool16 newLine = kFalse 
)
pure virtual

Write a separator. i.e. " | "

Parameters
separatorcontent particle separator
newLinewhether to write new-line into stream after this content

Implemented in CXMLOutStream.