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

#include <IXMLStreamUtils.h>

Inheritance diagram for IXMLStreamUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IXMLSTREAMUTILS }
 

Public Member Functions

virtual IXMLOutStreamCreateXMLOutFileStream (const IDFile &file, IXMLOutStream::eEncodingType encoding, bool16 stripInvalid=kTrue)=0
 
virtual IXMLOutStreamCreateXMLOutPMStream (IPMStream *stream, IXMLOutStream::eEncodingType encoding, bool16 stripInvalid=kTrue)=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

Aid in the creations of XML output streams.

These methods create the stream and attempt to open it.

The return value is nil if the stream could not open.



For instance:

<pre>

InterfacePtr&lt;XMLOutStream&gt; s(CreateXMLOutFileStream(myFile, IXMLOutStream::kUTF16));

if (s) {

    ... 

use stream and close when done to flush and clean-up s->Close(); } else { ... handle error... }

Member Function Documentation

virtual IXMLOutStream* IXMLStreamUtils::CreateXMLOutFileStream (const IDFilefile,
IXMLOutStream::eEncodingType encoding,
bool16 stripInvalid = kTrue 
)
pure virtual

Method to create an XML output stream on a file. You must call Close() on the stream to ensure complete flushing and cleanup when done with the stream

Parameters
filespecifies the file target that the content will be streamed to
encodingspecifies encoding type for output file
stripInvaliddetermines if invalid Unicode chars are stripped from the output or converted to processing instructions that contain their hexidecimal equivalent
Returns
xml stream that wraps a file system stream, nil if stream could not be opened
virtual IXMLOutStream* IXMLStreamUtils::CreateXMLOutPMStream (IPMStreamstream,
IXMLOutStream::eEncodingType encoding,
bool16 stripInvalid = kTrue 
)
pure virtual

Method to create an XML output stream on an existing IPMStream, which could be file or memory based. You must call Close() on the stream to ensure complete flushing and cleanup when done with the stream

Parameters
streamexisting IPMStream
encodingone of the encoding types in IXMLOutStream
stripInvaliddetermines if invalid Unicode chars are stripped from the output or converted to processing instructions that contain their hexidecimal equivalent
Returns
xml stream that wraps a PMStream, nil if stream could not be opened