Home | Trees | Index | Help |
---|
Package beepy :: Package profiles :: Module mgmtparser :: Class Parser |
|
Method Summary | |
---|---|
Sets up an XML document parser. | |
__del__(self)
| |
Shutdown the parser and unlink any parsed documents | |
Called when character data is found. | |
Called when the end of a CDATA section is found | |
Called when an element close tag is found. | |
Hand off some data to the XML parser. | |
Zero the parser so that it is empty and ready to parse a new message | |
Get the channel number from a <close> message. | |
Get the code from an <error> message. | |
Get the description from an <error> message. | |
Get all the profiles in the message. | |
Get all the profile URIs in the message. | |
Get the channel number from a <start> message. | |
Check to see if the message contains at least one profile tag. | |
Check to see if this is a <close> message. | |
Check to see if this is an <error> message. | |
Check to see if this is an <ok> message. | |
Check to see if this is a <start> message. | |
Parse a bytestring as an XML document encoding a BEEP Management message. | |
Called when the start of a CDATA section is found | |
Called when the beginning of a tag is found. | |
The message type should be the first child node of the doc This is probably really fragile. | |
The internal parsing mechanism, used to create an XML DOM. |
Method Details |
---|
__init__(self,
data=None)
Sets up an XML document parser.
|
close(self)Shutdown the parser and unlink any parsed documents |
dataHandler(self, data)Called when character data is found. Both normal text and CDATA text flag as character data so we use the extra flag self.withinCdataSection to know if we're within a CDATA section. Since a CDATA section isn't a container, we only need a boolean type flag. |
endCdataSectionHandler(self)Called when the end of a CDATA section is found |
endElementHandler(self, name)Called when an element close tag is found. |
feed(self, data)Hand off some data to the XML parser. |
flushParser(self)Zero the parser so that it is empty and ready to parse a new message |
getCloseChannelNum(self, message=None)Get the channel number from a <close> message.
|
getErrorCode(self, message=None)Get the code from an <error> message.
|
getErrorString(self, message=None)Get the description from an <error> message.
|
getProfiles(self, message=None)Get all the profiles in the message.
|
getProfileURIs(self, message=None)Get all the profile URIs in the message.
|
getStartChannelNum(self, message=None)Get the channel number from a <start> message.
|
hasProfile(self, message=None)Check to see if the message contains at least one profile tag. |
isCloseMessage(self, message=None)Check to see if this is a <close> message. A close message has 1 <close> element. It must have a number attrib as well as a code attrib.
|
isErrorMessage(self, message=None)Check to see if this is an <error> message.
|
isOKMessage(self, message=None)Check to see if this is an <ok> message.
|
isStartMessage(self, message=None)Check to see if this is a <start> message. A start message has 1 <start> element that is a child of the document root. It must have a number attrib, may have a serverName attrib and must have at least one profile lement.
|
parse(self, data)Parse a bytestring as an XML document encoding a BEEP Management message.
|
startCdataSectionHandler(self)Called when the start of a CDATA section is found |
startElementHandler(self, name, attrs)Called when the beginning of a tag is found. |
_getMessageType(self)The message type should be the first child node of the doc This is probably really fragile. I don't think this is used anywhere. Should be removed. |
_parseData(self, data)The internal parsing mechanism, used to create an XML DOM.
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.0 on Thu Sep 30 14:39:25 2004 | http://epydoc.sf.net |