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

#include <IXMLParsingContext.h>

Inheritance diagram for IXMLParsingContext:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IXMLPARSINGCONTEXT }
 

Public Member Functions

virtual void Set (const XMLReference &element, const WideString &tagName, int32 childIndex, const UIDRef &storyRef, TextIndex insertPos, bool16 shouldInsert=kFalse)=0
 
virtual void Set (IXMLParsingContext *parsingContext)=0
 
virtual XMLReference GetElement () const =0
 
virtual void SetElement (const XMLReference &element)=0
 
virtual WideString GetTagName () const =0
 
virtual void SetTagName (const WideString &tagName)=0
 
virtual int32 GetChildIndex () const =0
 
virtual void SetChildIndex (int32 childIndex)=0
 
virtual UIDRef GetStoryRef () const =0
 
virtual void SetStoryRef (const UIDRef &storyRef)=0
 
virtual TextIndex GetInsertPos () const =0
 
virtual void SetInsertPos (TextIndex insertPos)=0
 
virtual bool16 ShouldInsert () const =0
 
virtual void SetShouldInsert (bool16 doInsert)=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

Interface for tracking the parsing context information necessary to add XML content to an InDesign document.

When importing XML content, information about the current element, story, and text insertion point are stored in an instance of this interface. The current parsing context information as well as a stack of previous parent elements are managed and mainted by ISAXServices.

IParsingContext is an interface of the kXMLParserLocatorBoss and additional parsing information can be stored by adding interfaces to this boss object.

Member Function Documentation

virtual int32 IXMLParsingContext::GetChildIndex () const
pure virtual

Returns the index of where the element can be found in its parent.

virtual XMLReference IXMLParsingContext::GetElement () const
pure virtual

Returns the element referred to by this context

virtual TextIndex IXMLParsingContext::GetInsertPos () const
pure virtual

Returns the text index elements and content will be inserted into the story.

virtual UIDRef IXMLParsingContext::GetStoryRef () const
pure virtual

Returns a reference to the story that contains the element.

virtual WideString IXMLParsingContext::GetTagName () const
pure virtual
Returns the tag name currently being parsed.  This will be the tag

name of the newly created element.

virtual void IXMLParsingContext::Set (const XMLReferenceelement,
const WideStringtagName,
int32 childIndex,
const UIDRefstoryRef,
TextIndex insertPos,
bool16 shouldInsert = kFalse 
)
pure virtual

Specify the context information

Parameters
elementA reference to the XML Element being created.
tagNameThe tag name of the element.
childIndexThe index of where the element resides in its parent.
storyRefThe story where the element will be created.
insertPosThe current insertion position for new elements or content in the context's story.
virtual void IXMLParsingContext::Set (IXMLParsingContextparsingContext)
pure virtual

Specify the context information by copying another context.

Parameters
parsingContextThe parsing context to be copied.
virtual void IXMLParsingContext::SetChildIndex (int32 childIndex)
pure virtual
Specify the child index of where the element can be found.

Parameters
childIndexThe child index of the element.
virtual void IXMLParsingContext::SetElement (const XMLReferenceelement)
pure virtual
Specify the element that has been created.

Parameters
elementThe newly created element.
virtual void IXMLParsingContext::SetInsertPos (TextIndex insertPos)
pure virtual
Specify the current insertion position for elements and content in context's story.

Parameters
insertPosThe current insertion position.
virtual void IXMLParsingContext::SetStoryRef (const UIDRefstoryRef)
pure virtual
Specify the story which will be used when creating the element.

Parameters
storyRefA reference to a story.
virtual void IXMLParsingContext::SetTagName (const WideStringtagName)
pure virtual
Specify the tag name of the newly created element.

Parameters
tagNameThe tag name.