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

Public Types | |
| enum | { kDefaultIID = IID_IDOMSERVICES } |
Public Member Functions | |
| virtual IIDXMLDOMDocument * | Parse (IPMStream *stream, ISAXEntityResolver *entityResolver=nil, IXMLDTDTokenHandler *dtdTokenHandler=nil, BaseProgressBar *progressBar=nil)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
A DOM-generating parser
This API should be used by applications wishing to parse XML files to generate a DOM tree. One instance of this object should be created for each XML document to be parsed.
Each IDOMServices object maintains a reference to the IIDXMLDOMDocument generated by parsing XML. Hanging on to the IDOMServices instance is one way to keep the DOM tree alive. Releasing the IDOMServices will reduce the reference count on the document by one. If the IDOMServices instance is the last reference, the document will be deleted, and all memory allocated to the DOM tree will be recovered.
Invalid Parameters
Unless otherwise indicated, it is an error to use an invalid container (IsValid() == false), or a NULL pointer, as a parameter to any function. In some instances, the requirement that a specific parameter must be valid is repeated in the commentary for the specific function. The lack of any indication in the commentary for the specific function should still be taken to mean that an invalid container or NULL pointer will result in a kAXEErrClientFault exception.
| pure virtual |
Parse any XML document
The application can use this method to instruct the DOM parser to begin parsing an XML document from a client defined stream. This function returns when the XML file is completely parsed, or when an error or fatal error occurs.
Applications may not invoke this method while a parse is in progress (they should create a new parser instead for each additional XML document).
| stream | The input stream for the top-level of the XML document. |
| entityResolver | Required if the client needs to resolve external entities. |
| dtdTokenHandler | The handler that handles DTD callbacks during XML DTD parsing. |
| progressBar | The progress bar to use during the parse. |