import xmlproc
class XMLProcessor(AbstractXML) def __init__(self) string __module__ = 'xmlproc' def do_parse(self,final=0) def parseEnd(self) def parseStart(self) def parse_cdata(self) def parse_charref(self) def parse_comment(self) def parse_data(self) def parse_doctype(self) def parse_end_tag(self) def parse_ent_ref(self) def parse_internal_dtd(self) def parse_pi(self) def parse_start_tag(self) def parse_xml_decl(self) # Methods inherited by XMLProcessor from AbstractXML def parse_string(self,org_val,allow_ext_ges,allow_pes) # Methods inherited by XMLProcessor from EntityParser def feed(self,new_data) def find_reg(self,regexp) def get_current_sysid(self) def get_index(self,target) def get_match(self,regexp) def get_pos(self) def get_region(self) def get_wrapped_match(self,wraps) def now_at(self,test_str) def open_entity(self,sysID) def parse_resource(self,sysID) def pop_entity(self) def push_entity(self,sysID,contents) def read_from(self,fileobj,bufsize=16384) def scan_to(self,target) def set_application(self,app) def set_entity_handler(self,ent) def set_error_handler(self,err) def set_start_point(self) def set_sysid(self,sysID) def skip_ws(self) def test_reg(self,regexp) def test_str(self,test_str) def update_pos(self)
Does the actual parsing.
Accepts more data from the data source. This method must set self.datasize and correctly update self.pos and self.data.
Moves self.pos to the first character that matches the regexp.
Returns the sysid of the file we are reading now.
Finds the position where target starts and returns it.
Returns the result of matching the regexp and advances self.pos.
Returns a tuple (line,col).
Returns the area from start_point to current position and remove start_point.
Returns a contained match. Useful for regexps inside quotes.
Checks if we are at this string now, and if so skips over it.
Starts parsing a new entity, pushing the old onto the stack. This method must not be used to start parsing, use parse_resource for that.
Must be called when parsing is finished. (Cleans up and notifies application.
Must be called before parsing starts. (Notifies application.)
Parses a CDATA marked section from after the <![CDATA[.
Parses a character reference.
Parses the comment from after <!-- and beyond -->.
Parses character data.
Parses the document type declaration.
Parses the end tag from after the </ and beyond >.
Parses a general entity reference from after the &.
Parse the internal DTD beyond the ]>.
Parses a processing instruction from after the <? and beyond the ?>.
Begin parsing an XML entity with the specified public and system identifiers (the system identifier, a URI, is required). Only used to start parsing, not to handle subentities, which open_entity takes care of.
Parses the start tag.
Parses a string (attribute value, entity value) and resolves all entity references in it. allow_ext_ges specifies whether external general entity references are allowed. allow_pes specifies whether parameter entities are allowed at all.
Parses the contents of the XML declaration from after the !xml.
Skips out of the current entity and back to the previous one.
Parse some text and consider it a new entity, making it possible to return to the original entity later.
Reads data from a file-like object until EOF. Does not close it. WARNING: This method does not call the parseStart/parseEnd methods, since it does not know if it may be called several times. Use parse_resource if you just want to read a file.
Moves self.pos to beyond target and returns skipped text.
Sets the object to send data events to.
Sets the object that resolves entity references.
Sets the object to send error events to.
Stores the current position and tells the parser not to forget any of the data beyond this point until get_region is called.
Sets the current system identifier. Does not store the old one.
Skips over any whitespace at this point.
Checks if we match the regexp.
See if text at current position matches test_str, without moving.
Updates (line,col)-pos by checking processed blocks.