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

#include <IXMLHandler.h>

Inheritance diagram for IXMLHandler:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IXMLHANDLER }
 

Public Member Functions

virtual void HandleElementBefore (IIDXMLElement *element)=0
 
virtual void HandleAfterNthChild (IIDXMLElement *element, int32 childIndex)=0
 
virtual void HandleElementAfter (IIDXMLElement *element)=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

Handler interface, gets called for every element of the structure tree, when tree is iterated. One example is the export handler, which works in tandem with an IXMLGenerator, calling the methods on IXMLGenerator interfaces on elements (and heir content items, if they can generate XML to) in the structure tree interface to generate the XML output; e.g. when the handler gets HandleElementBefore, it calls IXMLGenerator::GenerateBeginTag on the element, and then on the content item, if it has an IXMLGenerator.

Member Function Documentation

virtual void IXMLHandler::HandleAfterNthChild (IIDXMLElementelement,
int32 childIndex 
)
pure virtual

Called after each child is processed. This is the place to do stuff in between child elements

Parameters
elementspecifies current node in structure tree during traversal
childIndexindex in parent of child
virtual void IXMLHandler::HandleElementAfter (IIDXMLElementelement)
pure virtual

Called after element processed. For instance, the export handler calls IXMLGenerator::GenerateEndTag on the content item, then the element on this message.

Parameters
elementspecifies current node in structure tree during traversal
virtual void IXMLHandler::HandleElementBefore (IIDXMLElementelement)
pure virtual

Called before element processed.

Parameters
elementspecifies current node in structure tree during traversal