Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

vtkExpatBase Class Reference

#include <vtkExpatBase.h>

Inheritance diagram for vtkExpatBase:

Inheritance graph
[legend]
Collaboration diagram for vtkExpatBase:

Collaboration graph
[legend]
List of all members.

Detailed Description

VTK object wrapper for the Expat XML parser.

vtkExpatBase follows a simple pattern for converting the semi-OOP callback design of expat into a true class which allows you to override virtual methods to supply callbacks.

The User Data which expat maintains is simply a pointer to an instance of your object. Inline static functions are specified as the callbacks to expat. These static functions take the user data parameter returned from expat and cast it to a pointer to an expatpp object. Using that typed pointer they then call the appropriate virtual method.

If you have overriden a given virtual method then your version will be called, otherwise the (empty) method in the base class is called.

Note:
For efficiency, you could provide your own constructor and set some of the callbacks to 0, so expat doesn't call the static functions.

Mutated from Andy Dent's expatpp.

Author:
Sean McInerney
Version:
Revision
1.4
Date:
Date
2004/08/10 07:37:21
See also:
vtkExtensionsObject

Definition at line 58 of file vtkExpatBase.h.

Parse position and error reporting (XML Implementation Interfaces)

These are the methods to call when the parse functions return XML_STATUS_ERROR (a parse error has occurred), although the position reporting functions are useful outside of errors.

The position reported is the byte position (in the original document or entity encoding) of the first of the sequence of characters that generated the current event (or the error that caused the parse functions to return XML_STATUS_ERROR.) The exceptions are callbacks trigged by declarations in the document prologue, in which case the exact position reported is somewhere in the relevant markup, but not necessarily as meaningful as for other events.

The position reporting functions are accurate only outside of the DTD. In other words, they usually return bogus information when called from within a DTD declaration handler.

XML_Error GetParserErrorCode (void)
 If XML_Parse returned XML_STATUS_ERROR, then GetParserErrorCode returns what type of error has occurred.

int GetCurrentLineNumber (void)
 Return the line number of the position.

int GetCurrentColumnNumber (void)
 Return the offset, from the beginning of the current line, of the position.

long GetCurrentByteIndex (void)
 Return the byte offset of the position.

int GetCurrentByteCount (void)
 Return the number of bytes in the current event.

const char * GetInputContext (int *aOffsetPtr, int *aSizePtr)
 Get the current parse poition in the input buffer.

const XML_LChar * GetParserErrorString (XML_Error aCode)
 Return a string describing the error corresponding to code.


Public Member Functions

 vtkTypeRevisionMacro (vtkExpatBase, vtkExtensionsObject)
void PrintSelf (ostream &, vtkIndent)
int Parse (void)
 Initiate the parsing process.

int GetInputStringLength (void) const
 Get the length of the string to parse.

void SetStream (istream *)
 Set/Get the file stream to read from, overriding any URI, if specified.

istream * GetStream (void) const
 Set/Get the file stream to read from, overriding any URI, if specified.

void SetFileName (const char *name)
 Set/Get the name of the file to read.

const char * GetFileName (void) const
 Set/Get the name of the file to read.

virtual int CanReadFile (const char *name)
 Test whether the file with the given name can be read by this reader.

int CanReadFile (void)
 Test whether the file with the given name can be read by this reader.

void SetInputString (const char *)
 Set/Get a string to parse.

const char * GetInputString (void) const
 Set/Get a string to parse.

Expat Wrapping Virtual Methods
Note:
All base class wrapping method implementations are empty.


virtual void ElementDecl (const XML_Char *name, XML_Content *model)
 Handler for element declarations in a DTD.

virtual void AttlistDecl (const XML_Char *elname, const XML_Char *attname, const XML_Char *attType, const XML_Char *defaultValue, int isRequired)
 Handler for ATTLIST declarations in the DTD.

virtual void XmlDecl (const XML_Char *version, const XML_Char *encoding, int standalone)
 Handles XML decls and text decls discovered in external entities.

virtual void EntityDecl (const XML_Char *entityName, int isParameterEntity, const XML_Char *value, int valueLength, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)
 Handler that will be called for all entity declarations.

virtual void StartElement (const XML_Char *name, const XML_Char **attrs)
 Handler for start (and empty) tags.

virtual void EndElement (const XML_Char *name)
 Handler for end (and empty) tags.

virtual void CharacterData (const XML_Char *data, int len)
 Text handler.

virtual void ProcessingInstruction (const XML_Char *target, const XML_Char *data)
 Handler for processing instructions.

virtual void Comment (const XML_Char *data)
 Handler for comments.

virtual void StartCdataSection (void)
 Handler that gets called at the beginning of a CDATA section.

virtual void EndCdataSection (void)
 Handler that gets called at the end of a CDATA section.

virtual void Default (const XML_Char *data, int len)
 Handles any characters in the document not otherwise handled.

virtual void StartDoctypeDecl (const XML_Char *doctypeName, const XML_Char *systemId, const XML_Char *publicId, int hasInternalSubset)
 Handler called at start of a DOCTYPE declaration, before any external or internal subset is parsed.

virtual void EndDoctypeDecl (void)
 Handler called at the end of a DOCTYPE declaration, after parsing any external subset.

void UnparsedEntityDecl (const XML_Char *aEntityName, const XML_Char *aBase, const XML_Char *aSystemId, const XML_Char *aPublicId, const XML_Char *aNotationName)
 Handler that receives declarations of unparsed entities.

virtual void NotationDecl (const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
 Handler that receives notation declarations.

virtual void StartNamespaceDecl (const XML_Char *prefix, const XML_Char *uri)
 Handler to be called when a namespace is declared.

virtual void EndNamespaceDecl (const XML_Char *prefix)
 Handler to be called when leaving the scope of a namespace declaration.

virtual int NotStandalone (void)
 Handler that is called if the document is not "standalone".

virtual int ExternalEntityRef (const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
 This is called for a reference to an external parsed general entity.

virtual void SkippedEntity (const XML_Char *entityName, int isParameterEntity)
 Skipped entity handler.

virtual int UnknownEncoding (const XML_Char *vtkNotUsed(name), XML_Encoding *vtkNotUsed(info))
 Set a handler to deal with encodings other than the built in set.


Static Public Member Functions

void PrintExpatFeatures (ostream &, vtkIndent)
 Check the features compiled into the parser.

XML User Interfaces
const XML_LChar * GetExpatVersion (void)
 Return a string containing the version number of this expat.

XML_Expat_Version GetExpatVersionInfo (void)
 Return an XML_Expat_Version structure containing numeric version number information for this version of expat.

const XML_Feature * GetExpatFeatureList (void)
 Returns a list of "feature" records, providing details on how Expat was configured at compile time.

Static Callback Methods
void ElementDeclCb (void *userData, const XML_Char *name, XML_Content *model)
void AttlistDeclCb (void *userData, const XML_Char *elname, const XML_Char *attname, const XML_Char *attType, const XML_Char *defaultValue, int isRequired)
void XmlDeclCb (void *userData, const XML_Char *version, const XML_Char *encoding, int standalone)
void EntityDeclCb (void *userData, const XML_Char *entityName, int isParameterEntity, const XML_Char *value, int valueLength, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)
void StartElementCb (void *userData, const XML_Char *name, const XML_Char **attrs)
void EndElementCb (void *userData, const XML_Char *name)
void CharacterDataCb (void *userData, const XML_Char *data, int len)
void ProcessingInstructionCb (void *userData, const XML_Char *target, const XML_Char *data)
void CommentCb (void *userData, const XML_Char *data)
void StartCdataSectionCb (void *userData)
void EndCdataSectionCb (void *userData)
void DefaultCb (void *userData, const XML_Char *data, int len)
void StartDoctypeDeclCb (void *userData, const XML_Char *doctypeName, const XML_Char *aSysid, const XML_Char *aPubid, int hasInternalSubset)
void EndDoctypeDeclCb (void *userData)
void UnparsedEntityDeclCb (void *userData, const XML_Char *entityName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)
void NotationDeclCb (void *userData, const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
void StartNamespaceDeclCb (void *userData, const XML_Char *prefix, const XML_Char *uri)
void EndNamespaceDeclCb (void *userData, const XML_Char *prefix)
int NotStandaloneCb (void *userData)
int ExternalEntityRefCb (XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)
void SkippedEntityCb (void *userData, const XML_Char *entityName, int isParameterEntity)
int UnknownEncodingCb (void *encodingHandlerData, const XML_Char *name, XML_Encoding *info)

Protected Member Functions

virtual void CheckFinalStatus (XML_Status)
 Override so subclass can react to an error causing exit from parse.

 operator XML_Parser () const
 Implicit conversion from type vtkExpatBase to type XML_Parser.

Parser Creation (XML Implementation Interfaces)
XML_Parser ExternalEntityParserCreate (const XML_Char *aContext, const XML_Char *aEncoding)
 Creates an XML_Parser object that can parse an external general entity.

Parsing Methods (XML Implementation Interfaces)
XML_Status XML_Parse (const char *aBuf, int aLen, int aIsFinal)
 Parses some input.

Miscellaneous Methods (XML Implementation Interfaces)
void GrabInternalParser (void)
 Set this object as the value passed as user data to callbacks.

XML_Status SetBase (const XML_Char *aBase)
 Set the base to be used for resolving relative URIs in system identifiers in declarations.

const XML_Char * GetBase (void)
 Return the base for resolving relative URIs.

int GetSpecifiedAttributeCount (void)
 Returns actual number of attribute/value pairs in the start-tag.

int GetIdAttributeIndex (void)
 Returns index of ID attribute passed in last call to XML_StartElementHandler.

XML_Status SetEncoding (const XML_Char *aEncoding)
 This is equivalent to supplying an encoding argument to XML_ParserCreate.

int SetParamEntityParsing (XML_ParamEntityParsing a)
 Controls parsing of parameter entities (including external DTD subset).

XML_Error UseForeignDTD (XML_Bool aToggle)
 If XML_TRUE is passed to this function, then the parser will assume that there is an external subset, even if none is specified in the document.

void SetReturnNSTriplet (int aToggle)
 Return name as a triplet in a single string separated by the separator character.

void DefaultCurrent (void)
 This can be called within a handler for a start element, end element, processing instruction or character data.

void FreeContentModel (XML_Content *aModel)
 Frees the content model passed to the element declaration handler.

Customizable Behaviour Methods (overrides MUST call parent)
virtual void ReleaseParser (void)
 Provide single point that will call ::XML_ParserFree.

virtual void ResetParser (void)
 Reset the parser and its event handlers, preparing for reuse.

virtual void SetupHandlers (void)
 Set the handlers used by expat callbacks.

Internal Handler Setter Convenience Methods
void SetElementDeclHandler (XML_ElementDeclHandler a=ElementDeclCb)
void SetAttlistDeclHandler (XML_AttlistDeclHandler a=AttlistDeclCb)
void SetXmlDeclHandler (XML_XmlDeclHandler a=XmlDeclCb)
void SetEntityDeclHandler (XML_EntityDeclHandler a=EntityDeclCb)
void SetElementHandler (XML_StartElementHandler a1=StartElementCb, XML_EndElementHandler a2=EndElementCb)
void SetStartElementHandler (XML_StartElementHandler a=StartElementCb)
void SetEndElementHandler (XML_EndElementHandler a=EndElementCb)
void SetCharacterDataHandler (XML_CharacterDataHandler a=CharacterDataCb)
void SetProcessingInstructionHandler (XML_ProcessingInstructionHandler a=ProcessingInstructionCb)
void SetCommentHandler (XML_CommentHandler a=CommentCb)
void SetCdataSectionHandler (XML_StartCdataSectionHandler a1=StartCdataSectionCb, XML_EndCdataSectionHandler a2=EndCdataSectionCb)
void SetStartCdataSectionHandler (XML_StartCdataSectionHandler a=StartCdataSectionCb)
void SetEndCdataSectionHandler (XML_EndCdataSectionHandler a=EndCdataSectionCb)
void SetDefaultHandler (XML_DefaultHandler a=DefaultCb)
void SetDefaultHandlerExpand (XML_DefaultHandler a=DefaultCb)
void SetDoctypeDeclHandler (XML_StartDoctypeDeclHandler a1=StartDoctypeDeclCb, XML_EndDoctypeDeclHandler a2=EndDoctypeDeclCb)
void SetStartDoctypeDeclHandler (XML_StartDoctypeDeclHandler a=StartDoctypeDeclCb)
void SetEndDoctypeDeclHandler (XML_EndDoctypeDeclHandler a=EndDoctypeDeclCb)
void SetUnparsedEntityDeclHandler (XML_UnparsedEntityDeclHandler a=UnparsedEntityDeclCb)
void SetNotationDeclHandler (XML_NotationDeclHandler a=NotationDeclCb)
void SetNamespaceDeclHandler (XML_StartNamespaceDeclHandler a1=StartNamespaceDeclCb, XML_EndNamespaceDeclHandler a2=EndNamespaceDeclCb)
void SetStartNamespaceDeclHandler (XML_StartNamespaceDeclHandler a=StartNamespaceDeclCb)
void SetEndNamespaceDeclHandler (XML_EndNamespaceDeclHandler a=EndNamespaceDeclCb)
void SetNotStandaloneHandler (XML_NotStandaloneHandler a=NotStandaloneCb)
void SetExternalEntityRefHandler (XML_ExternalEntityRefHandler a=ExternalEntityRefCb)
void SetExternalEntityRefHandlerArg (void *a)
void SetExternalEntityRefHandlerArg (void)
void SetSkippedEntityHandler (XML_SkippedEntityHandler a=SkippedEntityCb)
void SetUnknownEncodingHandler (XML_UnknownEncodingHandler a=UnknownEncodingCb)
Creation and Destruction
 vtkExpatBase (int createParser=VTK_TRUE)
 Constructor; creates a parser by default.

virtual ~vtkExpatBase ()
 Destructor; disposes of parser and internal data.

Internal Execution Helper Methods
virtual int InputInitialize (void)
 Subclass-specific initialization (i.e.

virtual void InputFinalize (void)
 Subclass-specific termination (i.e.

virtual int ParseXML (void)
 Read the input stream parsing as we go.

virtual int ParsingComplete (void)
 Check to see whether parsing is complete.

virtual int ReadData (void)
 Subclass-specific initialization (i.e.


Static Protected Member Functions

Static Utility Methods
int GetAttributeVector (const XML_Char *const &target, const XML_Char **const &attrs, unsigned int const &len, int *&data)
 Get an attribute value converted to an int type vector.

int GetAttributeVector (const XML_Char *const &target, const XML_Char **const &attrs, unsigned int const &len, float *&data)
 Get an attribute value converted to a float type vector.

int GetAttributeVector (const XML_Char *const &target, const XML_Char **const &attrs, unsigned int const &len, double *&data)
 Get an attribute value converted to a double type vector.

int GetAttributeVector (const XML_Char *const &target, const XML_Char **const &attrs, unsigned int const &len, unsigned int *&data)
 Get an attribute value converted to a unsigned int type vector.

int GetAttributeValue (const XML_Char *const &target, const XML_Char **const &attrs, const XML_Char *&result)
 Get an attribute value.

int GetAttributeValue (const XML_Char *const &target, const XML_Char **const &attrs, const char *&result)
 Get an attribute value converted to a char type string.

int GetAttributeValue (const XML_Char *const &target, const XML_Char **const &attrs, int &result)
 Get an attribute value converted to an int type value.

int GetAttributeValue (const XML_Char *const &target, const XML_Char **const &attrs, float &result)
 Get an attribute value converted to a float type value.

int GetAttributeValue (const XML_Char *const &target, const XML_Char **const &attrs, double &result)
 Get an attribute value converted to a double type value.

int GetAttributeValue (const XML_Char *const &target, const XML_Char **const &attrs, unsigned int &result)
 Get an attribute value converted to an unsigned int type value.

int GetAttributeValue (const XML_Char *const &target, const XML_Char **const &attrs, bool &result)
 Get an attribute value converted to a boolean type value.

int EmptyCharacterData (const XML_Char *data, int len)
 Utility often used in overridden CharacterData() to check for data.

int SkipWhiteSpace (const char *data)
 Skip to first non-whitespace character.

int SkipWhiteSpace (const XML_Char *data)
 Skip to first non-whitespace character.


Protected Attributes

XML_Parser Parser
 The parser instance wrapped by this object.

void * EncodingData
 Untyped pointer needed by the UnknownEncoding handler.

int NeverParsed
 true if the Parser instance has not parsed any data.


Constructor & Destructor Documentation

vtkExpatBase::vtkExpatBase int  createParser = VTK_TRUE  )  [protected]
 

Constructor; creates a parser by default.

Subclasses my allow nesting in which case a pointer to the parent's parser may be passed rather than instantiating a new parser.

Note:
This class does not possess a New() static method. Since the constructor is protected, this is technically an abstact class and may only be instantiated via a subclass implementing a New() method (and implementing desired virtual method overrides to make it useful).

virtual vtkExpatBase::~vtkExpatBase  )  [protected, virtual]
 

Destructor; disposes of parser and internal data.


Member Function Documentation

virtual void vtkExpatBase::AttlistDecl const XML_Char *  elname,
const XML_Char *  attname,
const XML_Char *  attType,
const XML_Char *  defaultValue,
int  isRequired
[inline, virtual]
 

Handler for ATTLIST declarations in the DTD.

This handler is called for each attribute. So a single ATTLIST declaration with multiple attributes declared will generate multiple calls to this handler. The elname parameter returns the name of the element for which the attribute is being declared. The attribute name is in the attname parameter. The attribute type is in the attType parameter. It is the string representing the type in the declaration with whitespace removed.

Note:
The defaultValue parameter holds the default value. It will be NULL in the case of "#IMPLIED" or "#REQUIRED" attributes. You can distinguish these two cases by checking the isRequired parameter, which will be true in the case of "#REQUIRED" attributes. Attributes which are "#FIXED" will also have a true isRequired, but they will have the non-NULL fixed value in the defaultValue parameter.

Definition at line 185 of file vtkExpatBase.h.

void vtkExpatBase::AttlistDeclCb void *  userData,
const XML_Char *  elname,
const XML_Char *  attname,
const XML_Char *  attType,
const XML_Char *  defaultValue,
int  isRequired
[inline, static]
 

Definition at line 1547 of file vtkExpatBase.h.

References AttlistDeclCb().

Referenced by AttlistDeclCb().

int vtkExpatBase::CanReadFile void   ) 
 

Test whether the file with the given name can be read by this reader.

virtual int vtkExpatBase::CanReadFile const char *  name  )  [virtual]
 

Test whether the file with the given name can be read by this reader.

virtual void vtkExpatBase::CharacterData const XML_Char *  data,
int  len
[inline, virtual]
 

Text handler.

The string your handler receives is NOT zero terminated. You have to use the length argument to deal with the end of the string. A single block of contiguous text free of markup may still result in a sequence of calls to this handler. In other words, if you're searching for a pattern in the text, it may be split across calls to this handler.

Reimplemented in vtkPaletteColorBaseParser.

Definition at line 259 of file vtkExpatBase.h.

void vtkExpatBase::CharacterDataCb void *  userData,
const XML_Char *  data,
int  len
[inline, static]
 

Definition at line 1416 of file vtkExpatBase.h.

References CharacterDataCb().

Referenced by CharacterDataCb().

virtual void vtkExpatBase::CheckFinalStatus XML_Status   )  [inline, protected, virtual]
 

Override so subclass can react to an error causing exit from parse.

rather than leave it for application code to check status. Useful point to insert logging to silently grab failed parses

Definition at line 874 of file vtkExpatBase.h.

virtual void vtkExpatBase::Comment const XML_Char *  data  )  [inline, virtual]
 

Handler for comments.

The data is all text inside the comment delimiters.

Definition at line 274 of file vtkExpatBase.h.

void vtkExpatBase::CommentCb void *  userData,
const XML_Char *  data
[inline, static]
 

Definition at line 1433 of file vtkExpatBase.h.

References CommentCb().

Referenced by CommentCb().

virtual void vtkExpatBase::Default const XML_Char *  data,
int  len
[inline, virtual]
 

Handles any characters in the document not otherwise handled.

This includes both characters that are part of markup which is of a kind that is not reported (comments, markup declarations), or characters that are part of a construct which could be reported but for which no handler has been supplied. The characters are passed exactly as they were in the XML document except that they will be encoded in UTF-16. Line boundaries are not normalized. Note that a byte order mark character is not passed to the default handler. There are no guarantees about how characters are divided between calls to the default handler: for example, a comment might be split between multiple calls.

Definition at line 297 of file vtkExpatBase.h.

void vtkExpatBase::DefaultCb void *  userData,
const XML_Char *  data,
int  len
[inline, static]
 

Definition at line 1470 of file vtkExpatBase.h.

References DefaultCb().

Referenced by DefaultCb().

void vtkExpatBase::DefaultCurrent void   )  [inline, protected]
 

This can be called within a handler for a start element, end element, processing instruction or character data.

It causes the corresponding markup to be passed to the default handler.

Definition at line 761 of file vtkExpatBase.h.

virtual void vtkExpatBase::ElementDecl const XML_Char *  name,
XML_Content *  model
[inline, virtual]
 

Handler for element declarations in a DTD.

enum XML_Content_Type { XML_CTYPE_EMPTY = 1, XML_CTYPE_ANY, XML_CTYPE_MIXED, XML_CTYPE_NAME, XML_CTYPE_CHOICE, XML_CTYPE_SEQ };

enum XML_Content_Quant { XML_CQUANT_NONE, XML_CQUANT_OPT, XML_CQUANT_REP, XML_CQUANT_PLUS };

typedef struct XML_cp XML_Content; struct XML_cp { enum XML_Content_Type type; enum XML_Content_Quant quant; const XML_Char* name; unsigned int numchildren; XML_Content* children; };

The handler gets called with the name of the element in the declaration and a pointer to a structure that contains the element model. It is the application's responsibility to free this data structure.

The model argument is the root of a tree of XML_Content nodes. If type equals XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be XML_CQUANT_NONE, and the other fields will be zero or NULL. If type is XML_CTYPE_MIXED, then quant will be XML_CQUANT_NONE or XML_CQUANT_REP and numchildren will contain the number of elements that are allowed to be mixed in and children points to an array of XML_Content structures that will all have type XML_CTYPE_NAME with no quantification. Only the root node can be type XML_CTYPE_EMPTY, XML_CTYPE_ANY, or XML_CTYPE_MIXED.

For type XML_CTYPE_NAME, the name field points to the name and the numchildren and children fields will be zero and NULL. The quant field will indicate any quantifiers placed on the name.

Types XML_CTYPE_CHOICE and XML_CTYPE_SEQ indicate a choice or sequence respectively. The numchildren field indicates how many nodes in the choice or sequence and children points to the nodes.

Definition at line 164 of file vtkExpatBase.h.

void vtkExpatBase::ElementDeclCb void *  userData,
const XML_Char *  name,
XML_Content *  model
[inline, static]
 

Definition at line 1539 of file vtkExpatBase.h.

References ElementDeclCb().

Referenced by ElementDeclCb().

int vtkExpatBase::EmptyCharacterData const XML_Char *  data,
int  len
[static, protected]
 

Utility often used in overridden CharacterData() to check for data.

virtual void vtkExpatBase::EndCdataSection void   )  [inline, virtual]
 

Handler that gets called at the end of a CDATA section.

Definition at line 282 of file vtkExpatBase.h.

void vtkExpatBase::EndCdataSectionCb void *  userData  )  [inline, static]
 

Definition at line 1446 of file vtkExpatBase.h.

References EndCdataSectionCb().

Referenced by EndCdataSectionCb().

virtual void vtkExpatBase::EndDoctypeDecl void   )  [inline, virtual]
 

Handler called at the end of a DOCTYPE declaration, after parsing any external subset.

Reimplemented in vtkPaletteParser.

Definition at line 315 of file vtkExpatBase.h.

void vtkExpatBase::EndDoctypeDeclCb void *  userData  )  [inline, static]
 

Definition at line 1533 of file vtkExpatBase.h.

References EndDoctypeDeclCb().

Referenced by EndDoctypeDeclCb().

virtual void vtkExpatBase::EndElement const XML_Char *  name  )  [inline, virtual]
 

Handler for end (and empty) tags.

As noted above, an empty tag generates a call to both start and end handlers.

Reimplemented in vtkPaletteMaterialParser, and vtkPaletteParser.

Definition at line 248 of file vtkExpatBase.h.

Referenced by vtkNestingExpatBase::NestedEndElementCb().

void vtkExpatBase::EndElementCb void *  userData,
const XML_Char *  name
[inline, static]
 

Definition at line 1409 of file vtkExpatBase.h.

References EndElementCb().

Referenced by EndElementCb().

virtual void vtkExpatBase::EndNamespaceDecl const XML_Char *  prefix  )  [inline, virtual]
 

Handler to be called when leaving the scope of a namespace declaration.

This will be called, for each namespace declaration, after the handler for the end tag of the element in which the namespace was declared.

Note:
When namespace processing is enabled, these are called once for each namespace declaration. The call to the start and end element handlers occur between the calls to the start and end namespace declaration handlers. For an xmlns attribute, prefix will be NULL. For an xmlns="" attribute, uri will be NULL.

Definition at line 372 of file vtkExpatBase.h.

void vtkExpatBase::EndNamespaceDeclCb void *  userData,
const XML_Char *  prefix
[inline, static]
 

Definition at line 1505 of file vtkExpatBase.h.

References EndNamespaceDeclCb().

Referenced by EndNamespaceDeclCb().

virtual void vtkExpatBase::EntityDecl const XML_Char *  entityName,
int  isParameterEntity,
const XML_Char *  value,
int  valueLength,
const XML_Char *  base,
const XML_Char *  systemId,
const XML_Char *  publicId,
const XML_Char *  notationName
[inline, virtual]
 

Handler that will be called for all entity declarations.

The isParameterEntity argument will be non-zero in the case of parameter entities and zero otherwise.

For internal entities

(<!ENTITY foo "bar">),
value will be non-NULL and systemId, publicId, and notationName will all be NULL. The value string is not NULL terminated; the length is provided in the valueLength parameter. Do not use valueLength to test for internal entities, since it is legal to have zero-length values. Instead check for whether or not value is NULL.

Note:
The notationName argument will have a non-NULL value only for unparsed entity declarations.

Definition at line 224 of file vtkExpatBase.h.

void vtkExpatBase::EntityDeclCb void *  userData,
const XML_Char *  entityName,
int  isParameterEntity,
const XML_Char *  value,
int  valueLength,
const XML_Char *  base,
const XML_Char *  systemId,
const XML_Char *  publicId,
const XML_Char *  notationName
[inline, static]
 

Definition at line 1559 of file vtkExpatBase.h.

References EntityDeclCb().

Referenced by EntityDeclCb().

XML_Parser vtkExpatBase::ExternalEntityParserCreate const XML_Char *  aContext,
const XML_Char *  aEncoding
[inline, protected]
 

Creates an XML_Parser object that can parse an external general entity.

Parameters:
aContext A '\0' - terminated string specifying the parse context. The context string consists of a sequence of tokens separated by formfeeds (\f); a token consisting of a name specifies that the general entity of the name is open; a token of the form prefix=uri specifies the namespace for a particular prefix; a token of the form =uri specifies the default namespace.
aEncoding A '\0' - terminated string giving the name of the externally specified encoding, or NULL if there is no externally specified encoding.
This can be called at any point after the first call to an ExternalEntityRefHandler as long as the parser has not yet been freed. The new parser is completely independent and may safely be used in a separate thread. The handlers and user data are initialized from the parser held by this instance.

Returns:
a new XML_Parser object or NULL if out of memory.

Definition at line 519 of file vtkExpatBase.h.

virtual int vtkExpatBase::ExternalEntityRef const XML_Char *  context,
const XML_Char *  base,
const XML_Char *  systemId,
const XML_Char *  publicId
[inline, virtual]
 

This is called for a reference to an external parsed general entity.

The referenced entity is not automatically parsed. The application can parse it immediately or later using ExternalEntityParserCreate.

Parameters:
context argument specifies the parsing context in the format expected by the context argument to ExternalEntityParserCreate. Context is valid only until the handler returns, so if the referenced entity is to be parsed later, it must be copied. context is NULL only when the entity is a parameter entity.
base The system identifier that should be used as the base for resolving systemId if systemId was relative. This is set by SetBase. It may be NULL.
systemId The system identifier as specified in the entity declaration. It will not be NULL.
publicId The public identifier, as specified in the entity declaration, or NULL if none was specified. The whitespace in the public identifier will have been normalized as required by the XML spec.
Returns:
XML_STATUS_ERROR if processing should not continue because of a fatal error in the handling of the external entity. In this case the calling parser will return an XML_ERROR_EXTERNAL_ENTITY_HANDLING error.

Definition at line 420 of file vtkExpatBase.h.

int vtkExpatBase::ExternalEntityRefCb XML_Parser  parser,
const XML_Char *  context,
const XML_Char *  base,
const XML_Char *  systemId,
const XML_Char *  publicId
[inline, static]
 

Definition at line 1452 of file vtkExpatBase.h.

References ExternalEntityRefCb().

Referenced by ExternalEntityRefCb().

void vtkExpatBase::FreeContentModel XML_Content *  aModel  )  [inline, protected]
 

Frees the content model passed to the element declaration handler.

Definition at line 765 of file vtkExpatBase.h.

int vtkExpatBase::GetAttributeValue const XML_Char *const &  target,
const XML_Char **const &  attrs,
bool &  result
[static, protected]
 

Get an attribute value converted to a boolean type value.

Parameters:
target Target attribute name.
attrs Attribute array passed to the StartElement callback.
result Reference to hold the passed boolean value.
Returns:
true on success, false on failure.
Exceptions:
bad_alloc Internal use of vtkStringOps::Duplicate could throw.

int vtkExpatBase::GetAttributeValue const XML_Char *const &  target,
const XML_Char **const &  attrs,
unsigned int &  result
[static, protected]
 

Get an attribute value converted to an unsigned int type value.

Parameters:
target Target attribute name.
attrs Attribute array passed to the StartElement callback.
result Reference to hold the passed unsigned int value.
Returns:
true on success, false on failure.
Exceptions:
bad_alloc Internal use of vtkStringOps::Duplicate could throw.

int vtkExpatBase::GetAttributeValue const XML_Char *const &  target,
const XML_Char **const &  attrs,
double &  result
[static, protected]
 

Get an attribute value converted to a double type value.

Parameters:
target Target attribute name.
attrs Attribute array passed to the StartElement callback.
result Reference to hold the passed double value.
Returns:
true on success, false on failure.
Exceptions:
bad_alloc Internal use of vtkStringOps::Duplicate could throw.

int vtkExpatBase::GetAttributeValue const XML_Char *const &  target,
const XML_Char **const &  attrs,
float &  result
[static, protected]
 

Get an attribute value converted to a float type value.

Parameters:
target Target attribute name.
attrs Attribute array passed to the StartElement callback.
result Reference to hold the passed float value.
Returns:
true on success, false on failure.
Exceptions:
bad_alloc Internal use of vtkStringOps::Duplicate could throw.

int vtkExpatBase::GetAttributeValue const XML_Char *const &  target,
const XML_Char **const &  attrs,
int &  result
[static, protected]
 

Get an attribute value converted to an int type value.

Parameters:
target Target attribute name.
attrs Attribute array passed to the StartElement callback.
result Reference to hold the passed int value.
Returns:
true on success, false on failure.
Exceptions:
bad_alloc Internal use of vtkStringOps::Duplicate could throw.

int vtkExpatBase::GetAttributeValue const XML_Char *const &  target,
const XML_Char **const &  attrs,
const char *&  result
[static, protected]
 

Get an attribute value converted to a char type string.

Parameters:
target Target attribute name.
attrs Attribute array passed to the StartElement callback.
result Reference to a pointer to hold the address of the returned char string.
Returns:
true on success, false on failure.
Exceptions:
bad_alloc Internal use of vtkStringOps::Duplicate could throw.
Note:
The converted char string result is held in internal static space.

int vtkExpatBase::GetAttributeValue const XML_Char *const &  target,
const XML_Char **const &  attrs,
const XML_Char *&  result
[static, protected]
 

Get an attribute value.

Parameters:
target Target attribute name.
attrs Attribute array passed to the StartElement callback.
result Reference to a pointer to hold the address of the returned XML_Char string.
Returns:
true on success, false on failure.
Exceptions:
bad_alloc Internal use of vtkStringOps::Duplicate could throw.
Note:
The result XML_Char string is a pointer into the attrs array and is probably invalid outside of the callback that originally received the attrs array.

int vtkExpatBase::GetAttributeVector const XML_Char *const &  target,
const XML_Char **const &  attrs,
unsigned int const &  len,
unsigned int *&  data
[static, protected]
 

Get an attribute value converted to a unsigned int type vector.

Parameters:
target Target attribute name.
attrs Attribute array passed to the StartElement callback.
len Maximum number of value that can be held by data.
data Buffer to hold the parsed double values.
Returns:
The number of values parsed or zero on failure.
Exceptions:
bad_alloc Internal use of vtkStringOps::Duplicate could throw.

int vtkExpatBase::GetAttributeVector const XML_Char *const &  target,
const XML_Char **const &  attrs,
unsigned int const &  len,
double *&  data
[static, protected]
 

Get an attribute value converted to a double type vector.

Parameters:
target Target attribute name.
attrs Attribute array passed to the StartElement callback.
len Maximum number of value that can be held by data.
data Buffer to hold the parsed double values.
Returns:
The number of values parsed or zero on failure.
Exceptions:
bad_alloc Internal use of vtkStringOps::Duplicate could throw.

int vtkExpatBase::GetAttributeVector const XML_Char *const &  target,
const XML_Char **const &  attrs,
unsigned int const &  len,
float *&  data
[static, protected]
 

Get an attribute value converted to a float type vector.

Parameters:
target Target attribute name.
attrs Attribute array passed to the StartElement callback.
len Maximum number of value that can be held by data.
data Buffer to hold the parsed float values.
Returns:
The number of values parsed or zero on failure.
Exceptions:
bad_alloc Internal use of vtkStringOps::Duplicate could throw.

int vtkExpatBase::GetAttributeVector const XML_Char *const &  target,
const XML_Char **const &  attrs,
unsigned int const &  len,
int *&  data
[static, protected]
 

Get an attribute value converted to an int type vector.

Parameters:
target Target attribute name.
attrs Attribute array passed to the StartElement callback.
len Maximum number of value that can be held by data.
data Buffer to hold the parsed int values.
Returns:
The number of values parsed or zero on failure.
Exceptions:
bad_alloc Internal use of vtkStringOps::Duplicate could throw.

const XML_Char* vtkExpatBase::GetBase void   )  [inline, protected]
 

Return the base for resolving relative URIs.

Definition at line 647 of file vtkExpatBase.h.

int vtkExpatBase::GetCurrentByteCount void   )  [inline, protected]
 

Return the number of bytes in the current event.

Returns:
Zero if the event is inside a reference to an internal entity as well as for the end-tag event for empty element tags (the later can be used to distinguish empty-element tags from empty elements using separate start and end tags).

Definition at line 606 of file vtkExpatBase.h.

long vtkExpatBase::GetCurrentByteIndex void   )  [inline, protected]
 

Return the byte offset of the position.

This always corresponds to the values returned by GetCurrentLineNumber and GetCurrentColumnNumber.

Definition at line 596 of file vtkExpatBase.h.

int vtkExpatBase::GetCurrentColumnNumber void   )  [inline, protected]
 

Return the offset, from the beginning of the current line, of the position.

Definition at line 588 of file vtkExpatBase.h.

int vtkExpatBase::GetCurrentLineNumber void   )  [inline, protected]
 

Return the line number of the position.

Note:
The first line is reported as 1.

Definition at line 581 of file vtkExpatBase.h.

const XML_Feature* vtkExpatBase::GetExpatFeatureList void   )  [inline, static]
 

Returns a list of "feature" records, providing details on how Expat was configured at compile time.

enum XML_FeatureEnum { XML_FEATURE_END = 0, XML_FEATURE_UNICODE, XML_FEATURE_UNICODE_WCHAR_T, XML_FEATURE_DTD, XML_FEATURE_CONTEXT_BYTES, XML_FEATURE_MIN_SIZE, XML_FEATURE_SIZEOF_XML_CHAR, XML_FEATURE_SIZEOF_XML_LCHAR };

typedef struct { enum XML_FeatureEnum feature; XML_LChar *name; long int value; } XML_Feature;

Most applications should not need to worry about this, but this information is otherwise not available from Expat. This function allows code that does need to check these features to do so at runtime.

Returns:
An array of XML_Feature, terminated by a record with a feature of XML_FEATURE_END and name of NULL, identifying the feature-test macros Expat was compiled with. Since an application that requires this kind of information needs to determine the type of character the name points to, records for the XML_FEATURE_SIZEOF_XML_CHAR and XML_FEATURE_SIZEOF_XML_LCHAR will be located at the beginning of the list, followed by XML_FEATURE_UNICODE and XML_FEATURE_UNICODE_WCHAR_T, if they are present at all.
Some features have an associated value. If there isn't an associated value, the value field is set to 0. At this time, the following features have been defined to have values:

XML_FEATURE_SIZEOF_XML_CHAR The number of bytes occupied by one XML_Char character. XML_FEATURE_SIZEOF_XML_LCHAR The number of bytes occupied by one XML_LChar character. XML_FEATURE_CONTEXT_BYTES The maximum number of characters of context which can be reported by GetInputContext.

Definition at line 837 of file vtkExpatBase.h.

const XML_LChar* vtkExpatBase::GetExpatVersion void   )  [inline, static]
 

Return a string containing the version number of this expat.

Definition at line 776 of file vtkExpatBase.h.

XML_Expat_Version vtkExpatBase::GetExpatVersionInfo void   )  [inline, static]
 

Return an XML_Expat_Version structure containing numeric version number information for this version of expat.

Definition at line 783 of file vtkExpatBase.h.

const char* vtkExpatBase::GetFileName void   )  const
 

Set/Get the name of the file to read.

int vtkExpatBase::GetIdAttributeIndex void   )  [inline, protected]
 

Returns index of ID attribute passed in last call to XML_StartElementHandler.

Returns:
The index of the ID attribute passed in the last call to XML_StartElementHandler, or -1 if there is no ID attribute. Each attribute/value pair counts as 2; thus this correspondds to an index into the atts array passed to the XML_StartElementHandler.

Definition at line 671 of file vtkExpatBase.h.

const char* vtkExpatBase::GetInputContext int *  aOffsetPtr,
int *  aSizePtr
[inline, protected]
 

Get the current parse poition in the input buffer.

If XML_CONTEXT_BYTES is defined, returns the input buffer, sets the integer pointed to by offset to the offset within this buffer of the current parse position, and sets the integer pointed to by size to the size of this buffer (the number of input bytes). Otherwise returns a NULL pointer. Also returns a NULL pointer if a parse isn't active.

Note:
The character pointer returned should not be used outside the handler that makes the call.

Definition at line 621 of file vtkExpatBase.h.

const char* vtkExpatBase::GetInputString void   )  const
 

Set/Get a string to parse.

int vtkExpatBase::GetInputStringLength void   )  const
 

Get the length of the string to parse.

XML_Error vtkExpatBase::GetParserErrorCode void   )  [inline, protected]
 

If XML_Parse returned XML_STATUS_ERROR, then GetParserErrorCode returns what type of error has occurred.

Definition at line 566 of file vtkExpatBase.h.

const XML_LChar* vtkExpatBase::GetParserErrorString XML_Error  aCode  )  [inline, static, protected]
 

Return a string describing the error corresponding to code.

The code should be one of the enumerations that can be returned from GetParserErrorCode.

Definition at line 574 of file vtkExpatBase.h.

int vtkExpatBase::GetSpecifiedAttributeCount void   )  [inline, protected]
 

Returns actual number of attribute/value pairs in the start-tag.

Returns:
The number of the attribute/value pairs passed in last call to the XML_StartElementHandler that were specified in the start-tag rather than defaulted. Each attribute/value pair counts as 2; thus this correspondds to an index into the atts array passed to the XML_StartElementHandler.

Definition at line 658 of file vtkExpatBase.h.

istream* vtkExpatBase::GetStream void   )  const
 

Set/Get the file stream to read from, overriding any URI, if specified.

void vtkExpatBase::GrabInternalParser void   )  [inline, protected]
 

Set this object as the value passed as user data to callbacks.

Definition at line 629 of file vtkExpatBase.h.

Referenced by vtkNestingExpatBase::GrabInternalParserFromParent(), and vtkNestingExpatBase::ReturnToParent().

virtual void vtkExpatBase::InputFinalize void   )  [protected, virtual]
 

Subclass-specific termination (i.e.

free memory and close the input).

virtual int vtkExpatBase::InputInitialize void   )  [protected, virtual]
 

Subclass-specific initialization (i.e.

stat and open the input stream).

virtual void vtkExpatBase::NotationDecl const XML_Char *  notationName,
const XML_Char *  base,
const XML_Char *  systemId,
const XML_Char *  publicId
[inline, virtual]
 

Handler that receives notation declarations.

The base argument is whatever was set by SetBase. The notationName will never be NULL. The other arguments can be.

Definition at line 340 of file vtkExpatBase.h.

void vtkExpatBase::NotationDeclCb void *  userData,
const XML_Char *  notationName,
const XML_Char *  base,
const XML_Char *  systemId,
const XML_Char *  publicId
[inline, static]
 

Definition at line 1588 of file vtkExpatBase.h.

References NotationDeclCb().

Referenced by NotationDeclCb().

virtual int vtkExpatBase::NotStandalone void   )  [inline, virtual]
 

Handler that is called if the document is not "standalone".

Called if the document has an external subset or a reference to a parameter entity, but does not have standalone="yes". If this handler returns XML_STATUS_ERROR, then processing will not continue, and the parser will return a XML_ERROR_NOT_STANDALONE error. If parameter entity parsing is enabled, then in addition to the conditions above this handler will only be called if the referenced entity was actually read.

Definition at line 385 of file vtkExpatBase.h.

int vtkExpatBase::NotStandaloneCb void *  userData  )  [inline, static]
 

Definition at line 1599 of file vtkExpatBase.h.

References NotStandaloneCb().

Referenced by NotStandaloneCb().

vtkExpatBase::operator XML_Parser  )  const [inline, protected]
 

Implicit conversion from type vtkExpatBase to type XML_Parser.

Definition at line 1345 of file vtkExpatBase.h.

int vtkExpatBase::Parse void   ) 
 

Initiate the parsing process.

virtual int vtkExpatBase::ParseXML void   )  [protected, virtual]
 

Read the input stream parsing as we go.

All of the registered callbacks are called (if the parser encounters its associated event) within.

virtual int vtkExpatBase::ParsingComplete void   )  [protected, virtual]
 

Check to see whether parsing is complete.

Called before each block of input is read from the stream to check if parsing is complete. Can be replaced by subclasses to change the terminating condition for parsing. Parsing always stops when the end of file is reached in the stream.

void vtkExpatBase::PrintExpatFeatures ostream &  ,
vtkIndent 
[static]
 

Check the features compiled into the parser.

void vtkExpatBase::PrintSelf ostream &  ,
vtkIndent 
[virtual]
 

Reimplemented from vtkExtensionsObject.

Reimplemented in vtkNestingExpatBase, vtkPaletteColorBaseParser, and vtkPaletteElementParser.

virtual void vtkExpatBase::ProcessingInstruction const XML_Char *  target,
const XML_Char *  data
[inline, virtual]
 

Handler for processing instructions.

The target is the first word in the processing instruction. The data is the rest of the characters in it after skipping all whitespace after the initial word.

Definition at line 267 of file vtkExpatBase.h.

void vtkExpatBase::ProcessingInstructionCb void *  userData,
const XML_Char *  target,
const XML_Char *  data
[inline, static]
 

Definition at line 1424 of file vtkExpatBase.h.

References ProcessingInstructionCb().

Referenced by ProcessingInstructionCb().

virtual int vtkExpatBase::ReadData void   )  [protected, virtual]
 

Subclass-specific initialization (i.e.

stat and open the input stream).

virtual void vtkExpatBase::ReleaseParser void   )  [protected, virtual]
 

Provide single point that will call ::XML_ParserFree.

Warning:
Nothing else in this code should call ::XML_ParserFree!

Referenced by vtkNestingExpatBase::SetParent().

virtual void vtkExpatBase::ResetParser void   )  [protected, virtual]
 

Reset the parser and its event handlers, preparing for reuse.

This is particularly valuable when memory allocation overhead is disproportionatly high, such as when a large number of small documnents need to be parsed.

Warning:
ALL HANDLERS ARE CLEARED FROM THE PARSER !!! (these are initially set in the constructor).

void vtkExpatBase::SetAttlistDeclHandler XML_AttlistDeclHandler  a = AttlistDeclCb  )  [inline, protected]
 

Definition at line 1189 of file vtkExpatBase.h.

XML_Status vtkExpatBase::SetBase const XML_Char *  aBase  )  [inline, protected]
 

Set the base to be used for resolving relative URIs in system identifiers in declarations.

Resolving relative identifiers is left to the application: this value will be passed through as the base argument to the XML_ExternalEntityRefHandler, XML_NotationDeclHandler and XML_UnparsedEntityDeclHandler. The base argument will be copied.

Returns:
XML_STATUS_ERROR if out of memory, XML_STATUS_OK otherwise.

Definition at line 643 of file vtkExpatBase.h.

void vtkExpatBase::SetCdataSectionHandler XML_StartCdataSectionHandler  a1 = StartCdataSectionCb,
XML_EndCdataSectionHandler  a2 = EndCdataSectionCb
[inline, protected]
 

Definition at line 1227 of file vtkExpatBase.h.

void vtkExpatBase::SetCharacterDataHandler XML_CharacterDataHandler  a = CharacterDataCb  )  [inline, protected]
 

Definition at line 1214 of file vtkExpatBase.h.

void vtkExpatBase::SetCommentHandler XML_CommentHandler  a = CommentCb  )  [inline, protected]
 

Definition at line 1223 of file vtkExpatBase.h.

void vtkExpatBase::SetDefaultHandler XML_DefaultHandler  a = DefaultCb  )  [inline, protected]
 

Definition at line 1244 of file vtkExpatBase.h.

void vtkExpatBase::SetDefaultHandlerExpand XML_DefaultHandler  a = DefaultCb  )  [inline, protected]
 

Definition at line 1248 of file vtkExpatBase.h.

void vtkExpatBase::SetDoctypeDeclHandler XML_StartDoctypeDeclHandler  a1 = StartDoctypeDeclCb,
XML_EndDoctypeDeclHandler  a2 = EndDoctypeDeclCb
[inline, protected]
 

Definition at line 1252 of file vtkExpatBase.h.

void vtkExpatBase::SetElementDeclHandler XML_ElementDeclHandler  a = ElementDeclCb  )  [inline, protected]
 

Definition at line 1185 of file vtkExpatBase.h.

void vtkExpatBase::SetElementHandler XML_StartElementHandler  a1 = StartElementCb,
XML_EndElementHandler  a2 = EndElementCb
[inline, protected]
 

Definition at line 1201 of file vtkExpatBase.h.

XML_Status vtkExpatBase::SetEncoding const XML_Char *  aEncoding  )  [inline, protected]
 

This is equivalent to supplying an encoding argument to XML_ParserCreate.

Returns:
Non-zero on success, zero otherwise.
Note:
Calling SetEncoding after ::XML_Parse has no effect and returns XML_STATUS_ERROR.

Definition at line 681 of file vtkExpatBase.h.

void vtkExpatBase::SetEndCdataSectionHandler XML_EndCdataSectionHandler  a = EndCdataSectionCb  )  [inline, protected]
 

Definition at line 1239 of file vtkExpatBase.h.

void vtkExpatBase::SetEndDoctypeDeclHandler XML_EndDoctypeDeclHandler  a = EndDoctypeDeclCb  )  [inline, protected]
 

Definition at line 1264 of file vtkExpatBase.h.

void vtkExpatBase::SetEndElementHandler XML_EndElementHandler  a = EndElementCb  )  [inline, protected]
 

Definition at line 1210 of file vtkExpatBase.h.

void vtkExpatBase::SetEndNamespaceDeclHandler XML_EndNamespaceDeclHandler  a = EndNamespaceDeclCb  )  [inline, protected]
 

Definition at line 1290 of file vtkExpatBase.h.

void vtkExpatBase::SetEntityDeclHandler XML_EntityDeclHandler  a = EntityDeclCb  )  [inline, protected]
 

Definition at line 1197 of file vtkExpatBase.h.

void vtkExpatBase::SetExternalEntityRefHandler XML_ExternalEntityRefHandler  a = ExternalEntityRefCb  )  [inline, protected]
 

Definition at line 1299 of file vtkExpatBase.h.

void vtkExpatBase::SetExternalEntityRefHandlerArg void   )  [inline, protected]
 

Definition at line 1308 of file vtkExpatBase.h.

void vtkExpatBase::SetExternalEntityRefHandlerArg void *  a  )  [inline, protected]
 

Definition at line 1304 of file vtkExpatBase.h.

void vtkExpatBase::SetFileName const char *  name  ) 
 

Set/Get the name of the file to read.

void vtkExpatBase::SetInputString const char *   ) 
 

Set/Get a string to parse.

void vtkExpatBase::SetNamespaceDeclHandler XML_StartNamespaceDeclHandler  a1 = StartNamespaceDeclCb,
XML_EndNamespaceDeclHandler  a2 = EndNamespaceDeclCb
[inline, protected]
 

Definition at line 1278 of file vtkExpatBase.h.

void vtkExpatBase::SetNotationDeclHandler XML_NotationDeclHandler  a = NotationDeclCb  )  [inline, protected]
 

Definition at line 1274 of file vtkExpatBase.h.

void vtkExpatBase::SetNotStandaloneHandler XML_NotStandaloneHandler  a = NotStandaloneCb  )  [inline, protected]
 

Definition at line 1295 of file vtkExpatBase.h.

int vtkExpatBase::SetParamEntityParsing XML_ParamEntityParsing  a  )  [inline, protected]
 

Controls parsing of parameter entities (including external DTD subset).

If parsing of parameter entities is enabled, then references to external parameter entities (including the external DTD subset) will be passed to the handler set with SetExternalEntityRefHandler. The context passed will be 0.

Unlike external general entities, external parameter entities can only be parsed synchronously. If the external parameter entity is to be parsed, it must be parsed during the call to the external entity ref handler: the complete sequence of ExternalEntityParserCreate, ::XML_Parse and ::XML_ParserFree calls must be made during this call. After ExternalEntityParserCreate has been called to create the parser for the external parameter entity (context must be 0 for this call), it is illegal to make any calls on the old parser until ::XML_ParserFree has been called on this newly created parser.

Returns:
If the expat library has been compiled without support for parameter entity parsing (ie without XML_DTD being defined), then SetParamEntityParsing will return 0 if parsing of parameter entities is requested; otherwise it will return non-zero.

Definition at line 708 of file vtkExpatBase.h.

void vtkExpatBase::SetProcessingInstructionHandler XML_ProcessingInstructionHandler  a = ProcessingInstructionCb  )  [inline, protected]
 

Definition at line 1218 of file vtkExpatBase.h.

void vtkExpatBase::SetReturnNSTriplet int  aToggle  )  [inline, protected]
 

Return name as a triplet in a single string separated by the separator character.

If aToggle is non-zero, and namespace processing is in effect, and a name has a prefix (i.e. an explicit namespace qualifier) then that name is returned as a triplet in a single string separated by the separator character specified when the parser was created: URI + sep + local_name + sep + prefix.

If aToggle is zero, then namespace information is returned in the default manner (URI + sep + local_name) whether or not the names has a prefix.

Note:
Calling SetReturnNSTriplet after ::XML_Parse has no effect.

Definition at line 751 of file vtkExpatBase.h.

void vtkExpatBase::SetSkippedEntityHandler XML_SkippedEntityHandler  a = SkippedEntityCb  )  [inline, protected]
 

Definition at line 1312 of file vtkExpatBase.h.

void vtkExpatBase::SetStartCdataSectionHandler XML_StartCdataSectionHandler  a = StartCdataSectionCb  )  [inline, protected]
 

Definition at line 1234 of file vtkExpatBase.h.

void vtkExpatBase::SetStartDoctypeDeclHandler XML_StartDoctypeDeclHandler  a = StartDoctypeDeclCb  )  [inline, protected]
 

Definition at line 1259 of file vtkExpatBase.h.

void vtkExpatBase::SetStartElementHandler XML_StartElementHandler  a = StartElementCb  )  [inline, protected]
 

Definition at line 1206 of file vtkExpatBase.h.

void vtkExpatBase::SetStartNamespaceDeclHandler XML_StartNamespaceDeclHandler  a = StartNamespaceDeclCb  )  [inline, protected]
 

Definition at line 1285 of file vtkExpatBase.h.

void vtkExpatBase::SetStream istream *   ) 
 

Set/Get the file stream to read from, overriding any URI, if specified.

void vtkExpatBase::SetUnknownEncodingHandler XML_UnknownEncodingHandler  a = UnknownEncodingCb  )  [inline, protected]
 

Definition at line 1316 of file vtkExpatBase.h.

void vtkExpatBase::SetUnparsedEntityDeclHandler XML_UnparsedEntityDeclHandler  a = UnparsedEntityDeclCb  )  [inline, protected]
 

Definition at line 1269 of file vtkExpatBase.h.

virtual void vtkExpatBase::SetupHandlers void   )  [protected, virtual]
 

Set the handlers used by expat callbacks.

Note:
Reimplementations should call this base class method.

Reimplemented in vtkNestingExpatBase, vtkPaletteColorBaseParser, and vtkPaletteElementParser.

void vtkExpatBase::SetXmlDeclHandler XML_XmlDeclHandler  a = XmlDeclCb  )  [inline, protected]
 

Definition at line 1193 of file vtkExpatBase.h.

virtual void vtkExpatBase::SkippedEntity const XML_Char *  entityName,
int  isParameterEntity
[inline, virtual]
 

Skipped entity handler.

This is called in two situations:

1. An entity reference is encountered for which no declaration has been read and this is not an error.
2. An internal entity reference is read, but not expanded, because SetDefaultHandler has been called.
The isParameterEntity argument will be non-zero for a parameter entity and zero for a general entity.

Note:
Skipped parameter entities in declarations and skipped general entities in attribute values cannot be reported, because the event would be out of sync with the reporting of the declarations or attribute values

Definition at line 447 of file vtkExpatBase.h.

void vtkExpatBase::SkippedEntityCb void *  userData,
const XML_Char *  entityName,
int  isParameterEntity
[inline, static]
 

Definition at line 1478 of file vtkExpatBase.h.

References SkippedEntityCb().

Referenced by SkippedEntityCb().

int vtkExpatBase::SkipWhiteSpace const XML_Char *  data  )  [static, protected]
 

Skip to first non-whitespace character.

int vtkExpatBase::SkipWhiteSpace const char *  data  )  [static, protected]
 

Skip to first non-whitespace character.

virtual void vtkExpatBase::StartCdataSection void   )  [inline, virtual]
 

Handler that gets called at the beginning of a CDATA section.

Definition at line 278 of file vtkExpatBase.h.

void vtkExpatBase::StartCdataSectionCb void *  userData  )  [inline, static]
 

Definition at line 1440 of file vtkExpatBase.h.

References StartCdataSectionCb().

Referenced by StartCdataSectionCb().

virtual void vtkExpatBase::StartDoctypeDecl const XML_Char *  doctypeName,
const XML_Char *  systemId,
const XML_Char *  publicId,
int  hasInternalSubset
[inline, virtual]
 

Handler called at start of a DOCTYPE declaration, before any external or internal subset is parsed.

Both systemId and publicId may be NULL. The hasInternalSubset will be non-zero if the DOCTYPE declaration has an internal subset.

Reimplemented in vtkPaletteParser.

Definition at line 306 of file vtkExpatBase.h.

void vtkExpatBase::StartDoctypeDeclCb void *  userData,
const XML_Char *  doctypeName,
const XML_Char *  aSysid,
const XML_Char *  aPubid,
int  hasInternalSubset
[inline, static]
 

Definition at line 1522 of file vtkExpatBase.h.

References StartDoctypeDeclCb().

Referenced by StartDoctypeDeclCb().

virtual void vtkExpatBase::StartElement const XML_Char *  name,
const XML_Char **  attrs
[inline, virtual]
 

Handler for start (and empty) tags.

Attributes are passed to the start handler as a pointer to a vector of char pointers. Each attribute seen in a start (or empty) tag occupies 2 consecutive places in this vector: the attribute name followed by the attribute value. These pairs are terminated by a null pointer. Names and values are 0 terminated.

Reimplemented in vtkPaletteMaterialParser, and vtkPaletteParser.

Definition at line 241 of file vtkExpatBase.h.

Referenced by vtkNestingExpatBase::NestedStartElementCb().

void vtkExpatBase::StartElementCb void *  userData,
const XML_Char *  name,
const XML_Char **  attrs
[inline, static]
 

Definition at line 1401 of file vtkExpatBase.h.

References StartElementCb().

Referenced by StartElementCb().

virtual void vtkExpatBase::StartNamespaceDecl const XML_Char *  prefix,
const XML_Char *  uri
[inline, virtual]
 

Handler to be called when a namespace is declared.

Namespace declarations occur inside start tags. But the namespace declaration start handler is called before the start tag handler for each namespace declared in that start tag.

Note:
When namespace processing is enabled, these are called once for each namespace declaration. The call to the start and end element handlers occur between the calls to the start and end namespace declaration handlers. For an xmlns attribute, prefix will be NULL. For an xmlns="" attribute, uri will be NULL.

Definition at line 357 of file vtkExpatBase.h.

void vtkExpatBase::StartNamespaceDeclCb void *  userData,
const XML_Char *  prefix,
const XML_Char *  uri
[inline, static]
 

Definition at line 1496 of file vtkExpatBase.h.

References StartNamespaceDeclCb().

Referenced by StartNamespaceDeclCb().

virtual int vtkExpatBase::UnknownEncoding const XML_Char *  vtkNotUsed(name),
XML_Encoding *  vtkNotUsed(info)
[inline, virtual]
 

Set a handler to deal with encodings other than the built in set.

If the handler knows how to deal with an encoding with the given name, it should fill in the info data structure and return 1. Otherwise it should return 0.

typedef struct { int map[256]; void *data; int (*convert)(void *data, const char *s); void (*release)(void *data); } XML_Encoding;

The map array contains information for every possible possible leading byte in a byte sequence. If the corresponding value is >= 0, then it's a single byte sequence and the byte encodes that Unicode value. If the value is -1, then that byte is invalid as the initial byte in a sequence. If the value is -n, where n is an integer > 1, then n is the number of bytes in the sequence and the actual conversion is accomplished by a call to the function pointed at by convert. This function may return -1 if the sequence itself is invalid. The convert pointer may be null if there are only single byte codes. The data parameter passed to the convert function is the data pointer from XML_Encoding. The string s is NOT null terminated and points at the sequence of bytes to be converted.

The function pointed at by release is called by the parser when it is finished with the encoding. It may be null.

Definition at line 481 of file vtkExpatBase.h.

int vtkExpatBase::UnknownEncodingCb void *  encodingHandlerData,
const XML_Char *  name,
XML_Encoding *  info
[inline, static]
 

Definition at line 1487 of file vtkExpatBase.h.

References UnknownEncodingCb().

Referenced by UnknownEncodingCb().

void vtkExpatBase::UnparsedEntityDecl const XML_Char *  aEntityName,
const XML_Char *  aBase,
const XML_Char *  aSystemId,
const XML_Char *  aPublicId,
const XML_Char *  aNotationName
[inline]
 

Handler that receives declarations of unparsed entities.

These are entity declarations that have a notation (NDATA) field:

<!ENTITY logo SYSTEM "images/logo.gif" NDATA gif>

Warning:
This handler is obsolete and is provided for backwards compatibility. Use EntityDecl() instead

Definition at line 328 of file vtkExpatBase.h.

void vtkExpatBase::UnparsedEntityDeclCb void *  userData,
const XML_Char *  entityName,
const XML_Char *  base,
const XML_Char *  systemId,
const XML_Char *  publicId,
const XML_Char *  notationName
[inline, static]
 

Definition at line 1576 of file vtkExpatBase.h.

References UnparsedEntityDeclCb().

Referenced by UnparsedEntityDeclCb().

XML_Error vtkExpatBase::UseForeignDTD XML_Bool  aToggle  )  [inline, protected]
 

If XML_TRUE is passed to this function, then the parser will assume that there is an external subset, even if none is specified in the document.

In such a case the parser will call the ExternalEntityRefHandler with a value of NULL for the systemId argument (the publicId and context arguments will be NULL as well).

Note:
If this function is called, then this must be done before the first call to XML_Parse, since it will have no effect after that and will return XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING.

If the document does not have a DOCTYPE declaration at all, then StartDoctypeDeclHandler and EndDoctypeDeclHandler will not be called, despite an external subset being parsed.

If XML_DTD is not defined when Expat is compiled, returns XML_ERROR_FEATURE_REQUIRES_XML_DTD.

Definition at line 732 of file vtkExpatBase.h.

vtkExpatBase::vtkTypeRevisionMacro vtkExpatBase  ,
vtkExtensionsObject 
 

XML_Status vtkExpatBase::XML_Parse const char *  aBuf,
int  aLen,
int  aIsFinal
[inline, protected]
 

Parses some input.

Returns:
XML_STATUS_ERROR if a fatal error is detected.
Note:
The last call to XML_Parse must have aIsFinal true; aLen may be zero for this call (or any other).

Definition at line 533 of file vtkExpatBase.h.

virtual void vtkExpatBase::XmlDecl const XML_Char *  version,
const XML_Char *  encoding,
int  standalone
[inline, virtual]
 

Handles XML decls and text decls discovered in external entities.

The way to distinguish is that the version parameter will be NULL for text declarations. The encoding parameter may be NULL for an XML declaration. The standalone argument will contain -1, 0, or 1 indicating, respectively, that there was no standalone parameter in the declaration, that it was given as no, or that it was given as yes.

Definition at line 200 of file vtkExpatBase.h.

void vtkExpatBase::XmlDeclCb void *  userData,
const XML_Char *  version,
const XML_Char *  encoding,
int  standalone
[inline, static]
 

Definition at line 1512 of file vtkExpatBase.h.

References XmlDeclCb().

Referenced by XmlDeclCb().


Member Data Documentation

void* vtkExpatBase::EncodingData [protected]
 

Untyped pointer needed by the UnknownEncoding handler.

Definition at line 1351 of file vtkExpatBase.h.

int vtkExpatBase::NeverParsed [protected]
 

true if the Parser instance has not parsed any data.

Definition at line 1354 of file vtkExpatBase.h.

XML_Parser vtkExpatBase::Parser [protected]
 

The parser instance wrapped by this object.

Definition at line 1348 of file vtkExpatBase.h.

Referenced by vtkNestingExpatBase::GrabInternalParserFromParent().


The documentation for this class was generated from the following file:
Generated on Tue Aug 10 03:42:15 2004 for vtkExtensions by doxygen 1.3.7