Modern IDL by Michael Galloy

API documentation for example code

single page | use frames     summary     class     fields     routine details     file attributes

fileio/

mg_xmlsax_example__define.pro

includes main-level program

This class is an example of using a SAX parser to parse XML files.

Examples

Run the main-level program to see an example of using the class to parse an XML file available from the internet.

Author information

Author

Michael Galloy

Class description for mg_xmlsax_example

Inheritance

Properties

Properties in mg_xmlsax_example

_extra init

Fields

Fields in IDLFFXMLSAX

Fields in mg_xmlsax_example

INDENTATION 0L

Routines

Routines from mg_xmlsax_example__define.pro

result = mg_xmlsax_example::_getSpacing()

Returns the current indentation as a string.

mg_xmlsax_example::startElement, uri, local, name [, attname] [, attvalue]

Called by parser when an XML tag is first encountered.

mg_xmlsax_example::endElement, uri, local, name

Called by the parser when an XML tag is finished.

mg_xmlsax_example::characters, chars

Called for text content between tags.

result = mg_xmlsax_example::init( [_extra=keywords])

Initialize the XML SAX parser.

mg_xmlsax_example__define

Define instance variables for parser.

Routine details

top source mg_xmlsax_example::_getSpacingprivate

result = mg_xmlsax_example::_getSpacing()

Returns the current indentation as a string.

Return value

string

top source mg_xmlsax_example::startElement

mg_xmlsax_example::startElement, uri, local, name [, attname] [, attvalue]

Called by parser when an XML tag is first encountered.

Parameters

uri in required type=string

namespace URI associated with element

local in required type=string

tag name with any prefix removed

name in required type=string

tag name

attname in optional type=starr

attribute names, if present

attvalue in optional type=strarr

attribute values, if present

top source mg_xmlsax_example::endElement

mg_xmlsax_example::endElement, uri, local, name

Called by the parser when an XML tag is finished.

Parameters

uri in required type=string

namespace URI associated with element

local in required type=string

tag name with any prefix removed

name in required type=string

tag name

top source mg_xmlsax_example::characters

mg_xmlsax_example::characters, chars

Called for text content between tags.

This method is called frequently because *any* character data between a begin and end tag counts (i.e. linefeeds, spaces, etc.).

Parameters

chars in required type=string

string between tags

top source mg_xmlsax_example::init

result = mg_xmlsax_example::init( [_extra=keywords])

Initialize the XML SAX parser.

Return value

1 if successful, 0 if not

Keywords

_extra in optional type=keywords

keywords to IDLffXMLSAX::init

top source mg_xmlsax_example__define

mg_xmlsax_example__define

Define instance variables for parser. Make sure to inherit from IDLffXMLSAX.

File attributes

Modification date: Fri Mar 26 22:42:03 2010
Lines: 40
Docformat: rst rst