InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CSAXDOMSerializerHandler Class Reference

#include <CSAXDOMSerializerHandler.h>

Inheritance diagram for CSAXDOMSerializerHandler:
CPMUnknown< ISAXDOMSerializerHandler >ISAXDOMSerializerHandlerIPMUnknownDataUpdaterDOMSerializerHandlerXDocBkCALSContentHandler

Public Member Functions

 CSAXDOMSerializerHandler (IPMUnknown *boss)
 
virtual void Register (ISAXDOMSerializerServices *saxServices, IPMUnknown *importer=nil)
 
virtual bool16 HandlesSubElements () const
 
virtual void Characters (const WideString &chars, IIDXMLDOMNode *currentNode)
 
virtual void StartDocument (ISAXDOMSerializerServices *saxServices)
 
virtual void EndDocument ()
 
virtual void StartElement (const WideString &uri, const WideString &localname, const WideString &qname, ISAXAttributeList *attrs, IIDXMLDOMNode *currentNode)
 
virtual void EndElement (const WideString &uri, const WideString &localname, const WideString &qname, IIDXMLDOMNode *currentNode)
 
virtual void StartPrefixMapping (const WideString &prefix, const WideString &uri)
 
virtual void EndPrefixMapping (const WideString &prefix)
 
virtual void ProcessingInstruction (const WideString &target, const WideString &data, IIDXMLDOMNode *currentNode)
 
virtual void ExtComment (const WideString &comment, IIDXMLDOMNode *currentNode)
 
- Public Member Functions inherited from CPMUnknown< ISAXDOMSerializerHandler >
IPMUnknownQueryInterface (PMIID interfaceID) const
 
void AddRef () const
 
void Release () const
 
void PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
void PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
 CPMUnknown (const CPMUnknown &)=delete
 
CPMUnknownoperator= (const CPMUnknown &)=delete
 

Protected Member Functions

bool16 HasAttribute (ISAXAttributeList *attrs, const WideString &key)
 
WideString GetAttributeString (ISAXAttributeList *attrs, const WideString &key, const WideString &defaultValue=WideString())
 
bool16 GetAttributeBool (ISAXAttributeList *attrs, const WideString &key, bool16 defaultValue=kFalse)
 
int32 GetAttributeInt (ISAXAttributeList *attrs, const WideString &key, int32 defaultValue=0)
 
- Protected Member Functions inherited from CPMUnknown< ISAXDOMSerializerHandler >
 CPMUnknown (IPMUnknown *boss)
 

Additional Inherited Members

- Public Types inherited from ISAXDOMSerializerHandler
enum  { kDefaultIID = IID_ISAXDOMSERIALIZERHANDLER }
 
- Protected Attributes inherited from CPMUnknown< ISAXDOMSerializerHandler >
HelperInterface fHelperInterface
 

Detailed Description

An empty base class implementation of ISAXDOMSerializerHandler. Clients who wish to serialize DOM should implement new classes derived from this class.

For a description of each method

See Also
ISAXDOMSerializerHandler

Member Function Documentation

virtual void CSAXDOMSerializerHandler::Characters (const WideStringchars,
IIDXMLDOMNodecurrentNode 
)
virtual

Receives character data

This method is called to report each chunk of character data. Contiguous character data is reported in a single chunk, or it may be split it into several chunks. But all characters in any single event must come from the same external entity.

The ignorableWhitespace() method is not implemented on this interface so all character data in the AXE DOM will be reported by this method.

Parameters
charsThe characters from the XML document.
currentNodeThe node that contained this data. It is only passed for access to any private client data.

Implements ISAXDOMSerializerHandler.

Reimplemented in XDocBkCALSContentHandler, and DataUpdaterDOMSerializerHandler.

virtual void CSAXDOMSerializerHandler::EndDocument ()
virtual

Receive end of document notification

This method only once and it will be the last method invoked during the traversal.

Implements ISAXDOMSerializerHandler.

virtual void CSAXDOMSerializerHandler::EndElement (const WideStringuri,
const WideStringlocalname,
const WideStringqname,
IIDXMLDOMNodecurrentNode 
)
virtual

Receive end of element notification

This method will be invoked at the end of every element in the XML document; there will be a corresponding startElement() event for every endElement() event (even when the element is empty).

Parameters
uriThe URI of the associated namespace for this element
localnameThe local part of the element name
qnameThe QName of this element
currentNodeThe same node passed to startElement.

Implements ISAXDOMSerializerHandler.

Reimplemented in XDocBkCALSContentHandler, and DataUpdaterDOMSerializerHandler.

virtual void CSAXDOMSerializerHandler::EndPrefixMapping (const WideStringprefix)
virtual

Receive end of namespace prefix mapping notification

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each namespace prefix mapping.

Parameters
prefixThe namespace prefix used

Implements ISAXDOMSerializerHandler.

virtual void CSAXDOMSerializerHandler::ExtComment (const WideStringcomment,
IIDXMLDOMNodecurrentNode 
)
virtual

(Extension) Receive a comment

This method will be invoked when the traveral encounters a comment.

Parameters
commentThe interior text of the comment.
currentNodeThe node that contained this data. It is only passed for access to any private client data.

Implements ISAXDOMSerializerHandler.

virtual bool16 CSAXDOMSerializerHandler::HandlesSubElements () const
virtual

When this handler is registered to handle an element with a specific tagname, the handler can decide if it wants to handle any subelements of that element that don't have a handler for themselves. If true is returned, any elements that are child elements without their own ISAXContentHandler will cause StartElement() to be called on this handler. If, however, false is returned, next handler on the stack will be called with HandlesSubElements() until one returns tru or we get to the default handler.

Returns
true if this handler will handle subelements, false if doesn't handle subelements

Implements ISAXDOMSerializerHandler.

Reimplemented in XDocBkCALSContentHandler, and DataUpdaterDOMSerializerHandler.

virtual void CSAXDOMSerializerHandler::ProcessingInstruction (const WideStringtarget,
const WideStringdata,
IIDXMLDOMNodecurrentNode 
)
virtual

Receive a processing instruction

This method will be invoked once for each processing instruction found: note that processing instructions may occur before or after the root element.

Parameters
targetThe processing instruction target
dataThe processing instruction data, or null if none was supplied
currentNodeThe node that contained this data. It is only passed for access to any private client data.

Implements ISAXDOMSerializerHandler.

virtual void CSAXDOMSerializerHandler::Register (ISAXDOMSerializerServicessaxServices,
IPMUnknownimporter = nil 
)
virtual

Register this handler to handle specific elements, attributes, and processing instructions.

When combined with a service provider implementation SAXDOMSerializerServices will call your Register method to allow the serializer handler to specify which elements, attributes, and/or processing instructions it is interested in handling. Registration is accomplished by calling RegisterElementHandler, RegisterAttributeHandler, and RegisterPIHandler.

Parameters
saxServicesThe instance of ISAXDOMSerializerServices instantiated for this DOM serialization.
importerThe instance of XMLImporter being used for this DOM serialization. The Handler needs to be able to get to the IMatchRecorder and IXMLImporterDOM from the interface passed in here.

Implements ISAXDOMSerializerHandler.

Reimplemented in XDocBkCALSContentHandler, and DataUpdaterDOMSerializerHandler.

virtual void CSAXDOMSerializerHandler::StartDocument (ISAXDOMSerializerServicessaxServices)
virtual

Receive the beginning of document notification

This method will be invoked once before other methods in this interface.

NOTE: Do NOT throw exceptions from this function.

Parameters
saxServicesThe instance of ISAXDOMSerializerServices instantiated for this DOM serialization.

Implements ISAXDOMSerializerHandler.

virtual void CSAXDOMSerializerHandler::StartElement (const WideStringuri,
const WideStringlocalname,
const WideStringqname,
ISAXAttributeListattrList,
IIDXMLDOMNodecurrentNode 
)
virtual

Receive the beginning of element notification

This method will be invoked at the beginning of every element in the XML document; there will be a corresponding endElement() event for every startElement() event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement() event.

Note that the attribute list provided will contain only attributes with explicit values (specified or defaulted): #IMPLIED attributes will be omitted.

Parameters
uriThe URI of the associated namespace for this element
localnameThe local part of the element name
qnameThe QName of this element
attrListThe attributes attached to the element, if any.
currentNodeThe node that contained this data. It is passed for access to the attribute value tree so that a client can determine if any entities were used to construct the attribute value. It can also be used to retrieve any private client data.
See Also
EndElement
ISAXAttributeList

Implements ISAXDOMSerializerHandler.

Reimplemented in XDocBkCALSContentHandler, and DataUpdaterDOMSerializerHandler.

virtual void CSAXDOMSerializerHandler::StartPrefixMapping (const WideStringprefix,
const WideStringuri 
)
virtual

Receive start of namespace prefix mapping notification

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each namespace prefix mapping.

Parameters
prefixThe namespace prefix used
uriThe namespace URI used.

Implements ISAXDOMSerializerHandler.