Links: Next Previous Up Top
So what do I do with an event?
The next_event method for the SGMLS class returns an
object belonging to the class SGMLS_Event.
This class has several methods available, as listed in table 1.
Table 1: The SGMLS_Event class
- Method
- type
- Return Type
- string
- Description
- Return the type of the event.
- Method
- data
- Return Type
- string, SGMLS_Element, or
SGMLS_Entity
- Description
- Return any data associated with the event.
- Method
- file
- Return Type
- string
- Description
- Return the name of the SGML source file which generated the
event, if available.
- Method
- line
- Return Type
- string
- Description
- Return the line number of the SGML source file which
generated the event, if available.
- Method
- element
- Return Type
- SGMLS_Element
- Description
- Return the element in force when the event was
generated.
- Method
- parse
- Return Type
- Return the SGMLS object for the current
parse.
- Method
- entity(ename)
- Return Type
- Look up an entity from those currently known to the parse. An
alias for ->parse->entity($ename)
- Method
- notation(nname)
- Return Type
- Look up the notation from those currently known to the parse:
an alias for ->parse->notation($nname).
The file and line methods
will return useful information only if you called onsgmls, sgmls or nsgmls
with the -l flag to include file and
line-number information.
Links: Next Previous Up Top
David Megginson <dmeggins@aix1.uottawa.ca>