June 2000
Intermediate to advanced
556 pages
8h 45m
English
As we have seen, the startElement handler in the DocumentHandler interface receives attributes in an object that implements the AttributeList interface.
The Python implementation of the AttributeList interface is in the file saxlib.py and looks like this.
CD-ROM reference=10016.txt
class AttributeList:
def getLength(self):
"Return the number of attributes in list."
pass
def getName(self, i):
"Return the name of an attribute in the list."
pass
def getType(self, i):
"""Return the type of an attribute in the list. (Parameter can be either integer
index or attribute name.)""" pass def getValue(self, i): """Return ...Read now
Unlock full access