• Home
  • Raw
  • Download

Lines Matching refs:rawdata

97         self.rawdata = ''
109 self.rawdata = self.rawdata + data
134 rawdata = self.rawdata
136 n = len(rawdata)
139 j = rawdata.find('<', i)
147 amppos = rawdata.rfind('&', max(i, n-34))
149 not re.compile(r'[\s;]').search(rawdata, amppos)):
153 match = self.interesting.search(rawdata, i) # < or &
162 self.handle_data(unescape(rawdata[i:j]))
164 self.handle_data(rawdata[i:j])
167 startswith = rawdata.startswith
169 if starttagopen.match(rawdata, i): # < + letter
187 k = rawdata.find('>', i + 1)
189 k = rawdata.find('<', i + 1)
195 self.handle_data(unescape(rawdata[i:k]))
197 self.handle_data(rawdata[i:k])
200 match = charref.match(rawdata, i)
210 if ";" in rawdata[i:]: # bail by consuming &#
211 self.handle_data(rawdata[i:i+2])
215 match = entityref.match(rawdata, i)
224 match = incomplete.match(rawdata, i)
227 if end and match.group() == rawdata[i:]:
246 self.handle_data(unescape(rawdata[i:n]))
248 self.handle_data(rawdata[i:n])
250 self.rawdata = rawdata[i:]
256 rawdata = self.rawdata
257 assert rawdata[i:i+2] == '<!', ('unexpected call to '
259 if rawdata[i:i+4] == '<!--':
262 elif rawdata[i:i+3] == '<![':
264 elif rawdata[i:i+9].lower() == '<!doctype':
266 gtpos = rawdata.find('>', i+9)
269 self.handle_decl(rawdata[i+2:gtpos])
277 rawdata = self.rawdata
278 assert rawdata[i:i+2] in ('<!', '</'), ('unexpected call to '
280 pos = rawdata.find('>', i+2)
284 self.handle_comment(rawdata[i+2:pos])
289 rawdata = self.rawdata
290 assert rawdata[i:i+2] == '<?', 'unexpected call to parse_pi()'
291 match = piclose.search(rawdata, i+2) # >
295 self.handle_pi(rawdata[i+2: j])
305 rawdata = self.rawdata
306 self.__starttag_text = rawdata[i:endpos]
310 match = tagfind_tolerant.match(rawdata, i+1)
315 m = attrfind_tolerant.match(rawdata, k)
329 end = rawdata[k:endpos].strip()
338 self.handle_data(rawdata[i:endpos])
352 rawdata = self.rawdata
353 m = locatestarttagend_tolerant.match(rawdata, i)
356 next = rawdata[j:j+1]
360 if rawdata.startswith("/>", j):
362 if rawdata.startswith("/", j):
386 rawdata = self.rawdata
387 assert rawdata[i:i+2] == "</", "unexpected call to parse_endtag"
388 match = endendtag.search(rawdata, i+1) # >
392 match = endtagfind.match(rawdata, i) # </ + tag + >
395 self.handle_data(rawdata[i:gtpos])
398 namematch = tagfind_tolerant.match(rawdata, i+2)
401 if rawdata[i:i+3] == '</>':
410 gtpos = rawdata.find('>', namematch.end())
417 self.handle_data(rawdata[i:gtpos])