![]() | InDesign SDK 20.5 |
#include <IXMLOutStream.h>

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< AttributeDfn > | AttributeDfnList |
| typedef K2Vector< Attribute > | AttributeList |
| typedef KeyValuePair < UTF16TextChar, const WideString * > | Entity |
| typedef K2Vector< Entity > | EntityMap |
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 ¬ationName, 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 IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
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.
Used to represent a list of AttributeDfn objects for an IXMLOutStream
Used to represent a list of Attribute objects for an IXMLOutStream
Enumeration of supported attribute qualifiers.
Enumeration of supported attribute types.
Enumeration of content particle occurrences
Enumeration of supported encoding types.
Enumeration of keywords
| pure virtual |
Add character entity mappings ('&' to '&', '<' to '<' etc) New mappings overwrite existing ones for the same character.
Implemented in CXMLOutStream.
| pure virtual |
Begin an ATTLIST declaration. i.e. "<!ATTLIST elementName"
| elementName | name of the element for the attributes |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Begin an ATTLIST declaration. i.e. "<!ATTLIST elementName"
| elementName | name of the element for the attributes |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Begin a CData section. Data and subsequent calls to Write() will escape entities or not depending on bool.
| data | content to write into CDATA section |
| escape | kTrue if standard entities to be escaped, kFalse otherwise |
Implemented in CXMLOutStream.
| inline |
Begin a CData section. Data and subsequent calls to Write() will escape entities or not depending on bool.
| data | content to write into CDATA section |
| escape | kTrue if standard entities to be escaped, kFalse otherwise |
| pure virtual |
Begin a content model declaration. i.e. "("
| separator | may optionally prepend a separator. i.e. ", (" Use kNone to add nothing |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
Begin definition of an Internal DTD with root element.
| root | name of the root element, e.g. article |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Begin definition of an Internal DTD with root element.
| root | name of the root element, e.g. article |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Begin definition of an external SYSTEM DTD with root element
| root | name of the root element, e.g. article |
| systemIDLiteral | SYSTEM ID literal |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
Begin definition of an external PUBLIC DTD with root element
| root | name of the root element, e.g. article |
| publicIDLiteral | PUBLIC ID literal |
| systemIDLiteral | SYSTEM ID literal |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
Begin an element type declaration. i.e. "<!ELEMENT elementName "
| elementName | specifies name of element |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Begin an element type declaration. i.e. "<!ELEMENT elementName "
| elementName | specifies name of element |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Begin an ENTITY declaration. i.e. "<!ENTITY entityName " or "<!ENTITY % entityName "
| entityName | name of the entity |
| generalEntity | kTrue to write a general entity; kFalse to write parameter entity |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Begin an ENTITY declaration. i.e. "<!ENTITY entityName " or "<!ENTITY % entityName "
| entityName | name of the entity |
| generalEntity | kTrue to write a general entity; kFalse to write parameter entity |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Begin a mixed content model declaration. i.e. "(#PCDATA"
| separator | may optionally prepend a separator. i.e. ", (#PCDATA" Use kNone to add nothing |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
Begin a NOTATION declaration. i.e. "<!NOTATION notationName "
| notationName | name of the notation |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Begin a NOTATION declaration. i.e. "<!NOTATION notationName "
| notationName | name of the notation |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Begin a Processing Instruction section. until EndCdata() is called. NewLine after the tag if necessary.
| piTarget | application to which the instruction is directed |
| piData | data to pass through to target application |
| newLine | whether to write new-line into stream after this content |
| escape | kTrue if standard entities to be escaped, kFalse otherwise |
Implemented in CXMLOutStream.
| pure virtual |
Utility method to check status flag on this interface
Implemented in CXMLOutStream.
| pure virtual |
must be called when done with stream to ensure final flush of stream content
Implemented in CXMLOutStream.
| pure virtual |
Comment will output a comment at the current stream position with no escaping of entities.
| comment | specifies comment data to write out |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Comment will output a comment at the current stream position with no escaping of entities.
| comment | specifies comment data to write out |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Write the XML header for this document.
| version | XML version (e.g. 1.0 is expected) |
| standalone | specifies whether the document should be described as standalone="yes" or not |
Implemented in CXMLOutStream.
| inline |
Write the XML header for this document.
| version | XML version (e.g. 1.0 is expected) |
| standalone | specifies whether the document should be described as standalone="yes" or not |
| pure virtual |
Write a SYSTEM DocType with root element and DTD pointed to by URI.
| root | name of the root element, e.g. article |
| URI | identifier for the document type |
Implemented in CXMLOutStream.
| inline |
| inline |
| inline |
| pure virtual |
Write a PUBLIC DocType with root element and DTD pointed to by URI and a name of public DTD.
| root | name of the root element, e.g. article |
| name | public identifier |
| URI | identifier for the document type |
Implemented in CXMLOutStream.
| pure virtual |
return whether indent is on or not
Implemented in CXMLOutStream.
| pure virtual |
End an ATTLIST declaration. i.e. ">"
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
End a CDataSection, with a newLine after if neccesary.
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
End a content model declaration. i.e. ")+"
| occurrence | occurrence of the content model |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
Ends definition of an Internal DTD.
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
End an element type declaration. i.e. ">"
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
End an ENTITY declaration. i.e. ">"
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
End a mixed content model declaration. i.e. ")*"
| writeOccurrence | whether to write the "*" occurrence. This should be kFalse only when the PCDATA is the only content particle in a mixed content model |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
End a NOTATION declaration. i.e. ">"
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
End a Processing Instruction, with a newLine after if neccesary
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
force all pending writes
Implemented in CXMLOutStream.
| pure virtual |
Formatting related; enable indent. If on, each output operation is indented based on the current indent level
| on | specifies whether to turn indenting on or off |
Implemented in CXMLOutStream.
| pure virtual |
Formatting related; indent level will determine how much to indent each write to the output stream, only effective if Indent is on
| increase | specifies whether to increase indent level or not |
Implemented in CXMLOutStream.
| pure virtual |
Must be called before any other methods to initialize stream.
| encoding | kUTF16 is Big or Litle Endian, depending on platform |
| stripInvalid | determines if invalid Unicode chars are stripped from the output or converted to processing instructions that contain their hexidecimal equivalent |
Implemented in CXMLOutStream.
| pure virtual |
Use to write the end tag for the top tag on the stack and to remove it from the stack
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
Use to write a new tag.
| tagName | specifies name of tag |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Use to write a new tag.
| tagName | specifies name of tag |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Use to write a new tag with attributes.
| tagName | specifies name of tag |
| attrs | list of its attributes |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Use to write a new tag with attributes.
| tagName | specifies name of tag |
| attrs | list of its attributes |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Clear the character entity table
| addStandardXMLEntity | specifies whether to add standard XML entity. |
Implemented in CXMLOutStream.
| pure virtual |
write the XML text declaration. See XML 1.0 spec 20001006, section 4.3.1
| version | XML version (e.g. 1.0 is expected) |
Implemented in CXMLOutStream.
| inline |
write the XML text declaration. See XML 1.0 spec 20001006, section 4.3.1
| version | XML version (e.g. 1.0 is expected) |
| 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.
| data | specifies content to write out |
| escape | kTrue if data to be escaped, kFalse otherwise |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| 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.
| data | specifies content to write out |
| escape | kTrue if data to be escaped, kFalse otherwise |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Write a declaration for an ATTLIST..
| elementName | name of the element, e.g. document |
| attrDfns | list of its attribute definitions |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Write a declaration for an ATTLIST..
| elementName | name of the element, e.g. document |
| attrDfns | list of its attribute definitions |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Write an attribute type. i.e. " CDATA"
| attType | attribute type to write |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
Write an attribute value. i.e. ""true""
| attValue | attribute value to write |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Write an attribute value. i.e. ""true""
| attValue | attribute value to write |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Write a content particle. i.e. "contentParticleName+"
| contentParticleName | content particle name |
| occurrence | content particle occurrence |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Write a content particle. i.e. "contentParticleName+"
| contentParticleName | content particle name |
| occurrence | content particle occurrence |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Write an empty tag such as '<foo/>'
| tagName | specifies name of tag to write |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Write an empty tag such as '<foo/>'
| tagName | specifies name of tag to write |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Write an empty tag with attributes such as '<foo bar = true/>'.
| tag | specifies tag name |
| attrs | list of attributes to write out |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Write an empty tag with attributes such as '<foo bar = true/>'.
| tag | specifies tag name |
| attrs | list of attributes to write out |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
output the current indent
Implemented in CXMLOutStream.
| pure virtual |
Write a keyword. i.e. "#PCDATA"
| keyword | keyword to write |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
Write a literal enclosed in quotes. i.e. ""literal""
| literal | literal to write |
| wrapInQuotes | whether to wrap the literal in quotes |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Write a literal enclosed in quotes. i.e. ""literal""
| literal | literal to write |
| wrapInQuotes | whether to wrap the literal in quotes |
| newLine | whether to write new-line into stream after this content |
| pure virtual |
Write a name. i.e. "name"
| name | name to write |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| inline |
Write a name. i.e. "name"
| name | name to write |
| newLine | whether to write new-line into stream after this content |
| 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.
| data | stream containing platform characters |
| start | stream offset of the first character to write |
| count | the number of characters to write |
| escape | kTrue if data to be escaped, kFalse otherwise |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.
| pure virtual |
Write a separator. i.e. " | "
| separator | content particle separator |
| newLine | whether to write new-line into stream after this content |
Implemented in CXMLOutStream.