MCPcopy
hub / github.com/pyload/pyload / parse_declaration

Method parse_declaration

module/lib/feedparser.py:729–746  ·  view source on GitHub ↗
(self, i)

Source from the content-addressed store, hash-verified

727 pass
728
729 def parse_declaration(self, i):
730 # override internal declaration handler to handle CDATA blocks
731 if _debug: sys.stderr.write('entering parse_declaration\n')
732 if self.rawdata[i:i+9] == '<![CDATA[':
733 k = self.rawdata.find(']]>', i)
734 if k == -1:
735 # CDATA block began but didn't finish
736 k = len(self.rawdata)
737 return k
738 self.handle_data(_xmlescape(self.rawdata[i+9:k]), 0)
739 return k+3
740 else:
741 k = self.rawdata.find('>', i)
742 if k >= 0:
743 return k+1
744 else:
745 # We have an incomplete CDATA block.
746 return k
747
748 def mapContentType(self, contentType):
749 contentType = contentType.lower()

Callers

nothing calls this directly

Calls 4

handle_dataMethod · 0.95
_xmlescapeFunction · 0.85
writeMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected