PageRenderTime 51ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/public_html/apidocs/pymine.beautifulsoup.BeautifulSoup.BeautifulSoup.html

http://pymine.googlecode.com/
HTML | 661 lines | 445 code | 216 blank | 0 comment | 0 complexity | 5926c905dbcde72fa38c1f28ae6eda46 MD5 | raw file
Possible License(s): Apache-2.0, LGPL-2.1
  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3. "DTD/xhtml1-strict.dtd">
  4. <html>
  5. <head>
  6. <title>API docs for &ldquo;pymine.beautifulsoup.BeautifulSoup.BeautifulSoup&rdquo;</title>
  7. <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
  8. <link href="apidocs.css" type="text/css" rel="stylesheet" />
  9. </head>
  10. <body>
  11. <h1 class="class">Class p.b.B.BeautifulSoup(<a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html">BeautifulStoneSoup</a>):</h1>
  12. <p>
  13. <span id="part">Part of <a href="pymine.html">pymine</a>.<a href="pymine.beautifulsoup.html">beautifulsoup</a>.<a href="pymine.beautifulsoup.BeautifulSoup.html">BeautifulSoup</a></span>
  14. <a href="classIndex.html#pymine.beautifulsoup.BeautifulSoup.BeautifulSoup">View In Hierarchy</a>
  15. </p>
  16. <div>
  17. <p>Known subclasses: <a href="pymine.beautifulsoup.BeautifulSoup.ICantBelieveItsBeautifulSoup.html">pymine.beautifulsoup.BeautifulSoup.ICantBelieveItsBeautifulSoup</a>, <a href="pymine.beautifulsoup.BeautifulSoup.MinimalSoup.html">pymine.beautifulsoup.BeautifulSoup.MinimalSoup</a>, <a href="pymine.beautifulsoup.BeautifulSoup.RobustHTMLParser.html">pymine.beautifulsoup.BeautifulSoup.RobustHTMLParser</a></p>
  18. </div>
  19. <pre>This parser knows the following facts about HTML:
  20. * Some tags have no closing tag and should be interpreted as being
  21. closed as soon as they are encountered.
  22. * The text inside some tags (ie. 'script') may contain tags which
  23. are not really part of the document and which should be parsed
  24. as text, not tags. If you want to parse the text as tags, you can
  25. always fetch it and parse it explicitly.
  26. * Tag nesting rules:
  27. Most tags can't be nested at all. For instance, the occurance of
  28. a &lt;p&gt; tag should implicitly close the previous &lt;p&gt; tag.
  29. &lt;p&gt;Para1&lt;p&gt;Para2
  30. should be transformed into:
  31. &lt;p&gt;Para1&lt;/p&gt;&lt;p&gt;Para2
  32. Some tags can be nested arbitrarily. For instance, the occurance
  33. of a &lt;blockquote&gt; tag should _not_ implicitly close the previous
  34. &lt;blockquote&gt; tag.
  35. Alice said: &lt;blockquote&gt;Bob said: &lt;blockquote&gt;Blah
  36. should NOT be transformed into:
  37. Alice said: &lt;blockquote&gt;Bob said: &lt;/blockquote&gt;&lt;blockquote&gt;Blah
  38. Some tags can be nested, but the nesting is reset by the
  39. interposition of other tags. For instance, a &lt;tr&gt; tag should
  40. implicitly close the previous &lt;tr&gt; tag within the same &lt;table&gt;,
  41. but not close a &lt;tr&gt; tag in another table.
  42. &lt;table&gt;&lt;tr&gt;Blah&lt;tr&gt;Blah
  43. should be transformed into:
  44. &lt;table&gt;&lt;tr&gt;Blah&lt;/tr&gt;&lt;tr&gt;Blah
  45. but,
  46. &lt;tr&gt;Blah&lt;table&gt;&lt;tr&gt;Blah
  47. should NOT be transformed into
  48. &lt;tr&gt;Blah&lt;table&gt;&lt;/tr&gt;&lt;tr&gt;Blah
  49. Differing assumptions about tag nesting rules are a major source
  50. of problems with the BeautifulSoup class. If BeautifulSoup is not
  51. treating as nestable a tag your page author treats as nestable,
  52. try ICantBelieveItsBeautifulSoup, MinimalSoup, or
  53. BeautifulStoneSoup before writing your own subclass.</pre>
  54. <div id="splitTables">
  55. <table class="children sortable" id="id67">
  56. <tr class="method">
  57. <td>Method</td>
  58. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulSoup.html#__init__">__init__</a></td>
  59. <td><span>The Soup object is initialized as the 'root tag', and the</span></td>
  60. </tr><tr class="method">
  61. <td>Method</td>
  62. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulSoup.html#start_meta">start_meta</a></td>
  63. <td><span>Beautiful Soup can detect a charset included in a META tag,</span></td>
  64. </tr>
  65. </table>
  66. <p>
  67. Inherited from <a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html">BeautifulStoneSoup</a>:
  68. </p>
  69. <table class="children sortable" id="id68">
  70. <tr class="basemethod">
  71. <td>Method</td>
  72. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#convert_charref">convert_charref</a></td>
  73. <td><span>This method fixes a bug in Python's SGMLParser.</span></td>
  74. </tr><tr class="basemethod">
  75. <td>Method</td>
  76. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#_feed">_feed</a></td>
  77. <td><span class="undocumented">Undocumented</span></td>
  78. </tr><tr class="basemethod">
  79. <td>Method</td>
  80. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#__getattr__">__getattr__</a></td>
  81. <td><span>This method routes method call requests to either the SGMLParser</span></td>
  82. </tr><tr class="basemethod">
  83. <td>Method</td>
  84. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#isSelfClosingTag">isSelfClosingTag</a></td>
  85. <td><span>Returns true iff the given string is the name of a</span></td>
  86. </tr><tr class="basemethod">
  87. <td>Method</td>
  88. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#reset">reset</a></td>
  89. <td><span class="undocumented">Undocumented</span></td>
  90. </tr><tr class="basemethod">
  91. <td>Method</td>
  92. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#popTag">popTag</a></td>
  93. <td><span class="undocumented">Undocumented</span></td>
  94. </tr><tr class="basemethod">
  95. <td>Method</td>
  96. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#pushTag">pushTag</a></td>
  97. <td><span class="undocumented">Undocumented</span></td>
  98. </tr><tr class="basemethod">
  99. <td>Method</td>
  100. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#endData">endData</a></td>
  101. <td><span class="undocumented">Undocumented</span></td>
  102. </tr><tr class="basemethod">
  103. <td>Method</td>
  104. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#_popToTag">_popToTag</a></td>
  105. <td><span>Pops the tag stack up to and including the most recent</span></td>
  106. </tr><tr class="basemethod">
  107. <td>Method</td>
  108. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#_smartPop">_smartPop</a></td>
  109. <td><span>We need to pop up to the previous tag of this type, unless</span></td>
  110. </tr><tr class="basemethod">
  111. <td>Method</td>
  112. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#unknown_starttag">unknown_starttag</a></td>
  113. <td><span class="undocumented">Undocumented</span></td>
  114. </tr><tr class="basemethod">
  115. <td>Method</td>
  116. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#unknown_endtag">unknown_endtag</a></td>
  117. <td><span class="undocumented">Undocumented</span></td>
  118. </tr><tr class="basemethod">
  119. <td>Method</td>
  120. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#handle_data">handle_data</a></td>
  121. <td><span class="undocumented">Undocumented</span></td>
  122. </tr><tr class="basemethod">
  123. <td>Method</td>
  124. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#_toStringSubclass">_toStringSubclass</a></td>
  125. <td><span>Adds a certain piece of text to the tree as a NavigableString</span></td>
  126. </tr><tr class="basemethod">
  127. <td>Method</td>
  128. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#handle_pi">handle_pi</a></td>
  129. <td><span>Handle a processing instruction as a ProcessingInstruction</span></td>
  130. </tr><tr class="basemethod">
  131. <td>Method</td>
  132. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#handle_comment">handle_comment</a></td>
  133. <td><span>Handle comments as Comment objects.</span></td>
  134. </tr><tr class="basemethod">
  135. <td>Method</td>
  136. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#handle_charref">handle_charref</a></td>
  137. <td><span>Handle character references as data.</span></td>
  138. </tr><tr class="basemethod">
  139. <td>Method</td>
  140. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#handle_entityref">handle_entityref</a></td>
  141. <td><span>Handle entity references as data, possibly converting known</span></td>
  142. </tr><tr class="basemethod">
  143. <td>Method</td>
  144. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#handle_decl">handle_decl</a></td>
  145. <td><span>Handle DOCTYPEs and the like as Declaration objects.</span></td>
  146. </tr><tr class="basemethod">
  147. <td>Method</td>
  148. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#parse_declaration">parse_declaration</a></td>
  149. <td><span>Treat a bogus SGML declaration as raw data. Treat a CDATA</span></td>
  150. </tr>
  151. </table>
  152. <p>
  153. Inherited from <a href="pymine.beautifulsoup.BeautifulSoup.Tag.html">Tag</a> (via <a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html">BeautifulStoneSoup</a>):
  154. </p>
  155. <table class="children sortable" id="id69">
  156. <tr class="basemethod">
  157. <td>Method</td>
  158. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#_invert">_invert</a></td>
  159. <td><span>Cheap function to invert a hash.</span></td>
  160. </tr><tr class="basemethod">
  161. <td>Method</td>
  162. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#_convertEntities">_convertEntities</a></td>
  163. <td><span>Used in a call to re.sub to replace HTML, XML, and numeric</span></td>
  164. </tr><tr class="basemethod">
  165. <td>Method</td>
  166. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#getString">getString</a></td>
  167. <td><span class="undocumented">Undocumented</span></td>
  168. </tr><tr class="basemethod">
  169. <td>Method</td>
  170. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#setString">setString</a></td>
  171. <td><span>Replace the contents of the tag with a string</span></td>
  172. </tr><tr class="basemethod">
  173. <td>Method</td>
  174. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#getText">getText</a></td>
  175. <td><span class="undocumented">Undocumented</span></td>
  176. </tr><tr class="basemethod">
  177. <td>Method</td>
  178. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#get">get</a></td>
  179. <td><span>Returns the value of the 'key' attribute for the tag, or</span></td>
  180. </tr><tr class="basemethod">
  181. <td>Method</td>
  182. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#clear">clear</a></td>
  183. <td><span>Extract all children.</span></td>
  184. </tr><tr class="basemethod">
  185. <td>Method</td>
  186. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#index">index</a></td>
  187. <td><span class="undocumented">Undocumented</span></td>
  188. </tr><tr class="basemethod">
  189. <td>Method</td>
  190. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#has_key">has_key</a></td>
  191. <td><span class="undocumented">Undocumented</span></td>
  192. </tr><tr class="basemethod">
  193. <td>Method</td>
  194. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__getitem__">__getitem__</a></td>
  195. <td><span>tag[key] returns the value of the 'key' attribute for the tag,</span></td>
  196. </tr><tr class="basemethod">
  197. <td>Method</td>
  198. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__iter__">__iter__</a></td>
  199. <td><span>Iterating over a tag iterates over its contents.</span></td>
  200. </tr><tr class="basemethod">
  201. <td>Method</td>
  202. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__len__">__len__</a></td>
  203. <td><span>The length of a tag is the length of its list of contents.</span></td>
  204. </tr><tr class="basemethod">
  205. <td>Method</td>
  206. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__contains__">__contains__</a></td>
  207. <td><span class="undocumented">Undocumented</span></td>
  208. </tr><tr class="basemethod">
  209. <td>Method</td>
  210. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__nonzero__">__nonzero__</a></td>
  211. <td><span>A tag is non-None even if it has no contents.</span></td>
  212. </tr><tr class="basemethod">
  213. <td>Method</td>
  214. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__setitem__">__setitem__</a></td>
  215. <td><span>Setting tag[key] sets the value of the 'key' attribute for the</span></td>
  216. </tr><tr class="basemethod">
  217. <td>Method</td>
  218. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__delitem__">__delitem__</a></td>
  219. <td><span>Deleting tag[key] deletes all 'key' attributes for the tag.</span></td>
  220. </tr><tr class="basemethod">
  221. <td>Method</td>
  222. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__call__">__call__</a></td>
  223. <td><span>Calling a tag like a function is the same as calling its</span></td>
  224. </tr><tr class="basemethod">
  225. <td>Method</td>
  226. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__eq__">__eq__</a></td>
  227. <td><span>Returns true iff this tag has the same name, the same attributes,</span></td>
  228. </tr><tr class="basemethod">
  229. <td>Method</td>
  230. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__ne__">__ne__</a></td>
  231. <td><span>Returns true iff this tag is not identical to the other tag,</span></td>
  232. </tr><tr class="basemethod">
  233. <td>Method</td>
  234. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__repr__">__repr__</a></td>
  235. <td><span>Renders this tag as a string.</span></td>
  236. </tr><tr class="basemethod">
  237. <td>Method</td>
  238. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__unicode__">__unicode__</a></td>
  239. <td><span class="undocumented">Undocumented</span></td>
  240. </tr><tr class="basemethod">
  241. <td>Method</td>
  242. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#_sub_entity">_sub_entity</a></td>
  243. <td><span>Used with a regular expression to substitute the</span></td>
  244. </tr><tr class="basemethod">
  245. <td>Method</td>
  246. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__str__">__str__</a></td>
  247. <td><span>Returns a string or Unicode representation of this tag and</span></td>
  248. </tr><tr class="basemethod">
  249. <td>Method</td>
  250. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#decompose">decompose</a></td>
  251. <td><span>Recursively destroys the contents of this tree.</span></td>
  252. </tr><tr class="basemethod">
  253. <td>Method</td>
  254. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#prettify">prettify</a></td>
  255. <td><span class="undocumented">Undocumented</span></td>
  256. </tr><tr class="basemethod">
  257. <td>Method</td>
  258. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#renderContents">renderContents</a></td>
  259. <td><span>Renders the contents of this tag as a string in the given</span></td>
  260. </tr><tr class="basemethod">
  261. <td>Method</td>
  262. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#find">find</a></td>
  263. <td><span>Return only the first child of this Tag matching the given</span></td>
  264. </tr><tr class="basemethod">
  265. <td>Method</td>
  266. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#findAll">findAll</a></td>
  267. <td><span>Extracts a list of Tag objects that match the given</span></td>
  268. </tr><tr class="basemethod">
  269. <td>Method</td>
  270. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#fetchText">fetchText</a></td>
  271. <td><span class="undocumented">Undocumented</span></td>
  272. </tr><tr class="basemethod">
  273. <td>Method</td>
  274. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#firstText">firstText</a></td>
  275. <td><span class="undocumented">Undocumented</span></td>
  276. </tr><tr class="basemethod">
  277. <td>Method</td>
  278. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#_getAttrMap">_getAttrMap</a></td>
  279. <td><span>Initializes a map representation of this tag's attributes,</span></td>
  280. </tr><tr class="basemethod">
  281. <td>Method</td>
  282. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#childGenerator">childGenerator</a></td>
  283. <td><span class="undocumented">Undocumented</span></td>
  284. </tr><tr class="basemethod">
  285. <td>Method</td>
  286. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#recursiveChildGenerator">recursiveChildGenerator</a></td>
  287. <td><span class="undocumented">Undocumented</span></td>
  288. </tr>
  289. </table>
  290. <p>
  291. Inherited from <a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html">PageElement</a> (via <a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html">BeautifulStoneSoup</a>, <a href="pymine.beautifulsoup.BeautifulSoup.Tag.html">Tag</a>):
  292. </p>
  293. <table class="children sortable" id="id70">
  294. <tr class="basemethod">
  295. <td>Method</td>
  296. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#setup">setup</a></td>
  297. <td><span>Sets up the initial relations between this element and</span></td>
  298. </tr><tr class="basemethod">
  299. <td>Method</td>
  300. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#replaceWith">replaceWith</a></td>
  301. <td><span class="undocumented">Undocumented</span></td>
  302. </tr><tr class="basemethod">
  303. <td>Method</td>
  304. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#replaceWithChildren">replaceWithChildren</a></td>
  305. <td><span class="undocumented">Undocumented</span></td>
  306. </tr><tr class="basemethod">
  307. <td>Method</td>
  308. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#extract">extract</a></td>
  309. <td><span>Destructively rips this element out of the tree.</span></td>
  310. </tr><tr class="basemethod">
  311. <td>Method</td>
  312. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#_lastRecursiveChild">_lastRecursiveChild</a></td>
  313. <td><span>Finds the last element beneath this object to be parsed.</span></td>
  314. </tr><tr class="basemethod">
  315. <td>Method</td>
  316. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#insert">insert</a></td>
  317. <td><span class="undocumented">Undocumented</span></td>
  318. </tr><tr class="basemethod">
  319. <td>Method</td>
  320. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#append">append</a></td>
  321. <td><span>Appends the given tag to the contents of this tag.</span></td>
  322. </tr><tr class="basemethod">
  323. <td>Method</td>
  324. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findNext">findNext</a></td>
  325. <td><span>Returns the first item that matches the given criteria and</span></td>
  326. </tr><tr class="basemethod">
  327. <td>Method</td>
  328. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findAllNext">findAllNext</a></td>
  329. <td><span>Returns all items that match the given criteria and appear</span></td>
  330. </tr><tr class="basemethod">
  331. <td>Method</td>
  332. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findNextSibling">findNextSibling</a></td>
  333. <td><span>Returns the closest sibling to this Tag that matches the</span></td>
  334. </tr><tr class="basemethod">
  335. <td>Method</td>
  336. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findNextSiblings">findNextSiblings</a></td>
  337. <td><span>Returns the siblings of this Tag that match the given</span></td>
  338. </tr><tr class="basemethod">
  339. <td>Method</td>
  340. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findPrevious">findPrevious</a></td>
  341. <td><span>Returns the first item that matches the given criteria and</span></td>
  342. </tr><tr class="basemethod">
  343. <td>Method</td>
  344. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findAllPrevious">findAllPrevious</a></td>
  345. <td><span>Returns all items that match the given criteria and appear</span></td>
  346. </tr><tr class="basemethod">
  347. <td>Method</td>
  348. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findPreviousSibling">findPreviousSibling</a></td>
  349. <td><span>Returns the closest sibling to this Tag that matches the</span></td>
  350. </tr><tr class="basemethod">
  351. <td>Method</td>
  352. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findPreviousSiblings">findPreviousSiblings</a></td>
  353. <td><span>Returns the siblings of this Tag that match the given</span></td>
  354. </tr><tr class="basemethod">
  355. <td>Method</td>
  356. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findParent">findParent</a></td>
  357. <td><span>Returns the closest parent of this Tag that matches the given</span></td>
  358. </tr><tr class="basemethod">
  359. <td>Method</td>
  360. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findParents">findParents</a></td>
  361. <td><span>Returns the parents of this Tag that match the given</span></td>
  362. </tr><tr class="basemethod">
  363. <td>Method</td>
  364. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#_findOne">_findOne</a></td>
  365. <td><span class="undocumented">Undocumented</span></td>
  366. </tr><tr class="basemethod">
  367. <td>Method</td>
  368. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#_findAll">_findAll</a></td>
  369. <td><span>Iterates over a generator looking for things that match.</span></td>
  370. </tr><tr class="basemethod">
  371. <td>Method</td>
  372. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#nextGenerator">nextGenerator</a></td>
  373. <td><span class="undocumented">Undocumented</span></td>
  374. </tr><tr class="basemethod">
  375. <td>Method</td>
  376. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#nextSiblingGenerator">nextSiblingGenerator</a></td>
  377. <td><span class="undocumented">Undocumented</span></td>
  378. </tr><tr class="basemethod">
  379. <td>Method</td>
  380. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#previousGenerator">previousGenerator</a></td>
  381. <td><span class="undocumented">Undocumented</span></td>
  382. </tr><tr class="basemethod">
  383. <td>Method</td>
  384. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#previousSiblingGenerator">previousSiblingGenerator</a></td>
  385. <td><span class="undocumented">Undocumented</span></td>
  386. </tr><tr class="basemethod">
  387. <td>Method</td>
  388. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#parentGenerator">parentGenerator</a></td>
  389. <td><span class="undocumented">Undocumented</span></td>
  390. </tr><tr class="basemethod">
  391. <td>Method</td>
  392. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#substituteEncoding">substituteEncoding</a></td>
  393. <td><span class="undocumented">Undocumented</span></td>
  394. </tr><tr class="basemethod">
  395. <td>Method</td>
  396. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#toEncoding">toEncoding</a></td>
  397. <td><span>Encodes an object to a string in some encoding, or to Unicode.</span></td>
  398. </tr>
  399. </table>
  400. </div>
  401. <div class="function">
  402. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulSoup.__init__"></a>
  403. <a name="__init__"></a>
  404. <div class="functionHeader">
  405. def __init__(self, *args, **kwargs):
  406. </div>
  407. <div class="functionBody">
  408. <div class="interfaceinfo">overrides <a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#__init__">pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.__init__</a></div>
  409. <pre>The Soup object is initialized as the 'root tag', and the
  410. provided markup (which can be a string or a file-like object)
  411. is fed into the underlying parser.
  412. sgmllib will process most bad HTML, and the BeautifulSoup
  413. class has some tricks for dealing with some HTML that kills
  414. sgmllib, but Beautiful Soup can nonetheless choke or lose data
  415. if your data uses self-closing tags or declarations
  416. incorrectly.
  417. By default, Beautiful Soup uses regexes to sanitize input,
  418. avoiding the vast majority of these problems. If the problems
  419. don't apply to you, pass in False for markupMassage, and
  420. you'll get better performance.
  421. The default parser massage techniques fix the two most common
  422. instances of invalid HTML that choke sgmllib:
  423. &lt;br/&gt; (No space between name of closing tag and tag close)
  424. &lt;! --Comment--&gt; (Extraneous whitespace in declaration)
  425. You can pass in a custom list of (RE object, replace method)
  426. tuples to get Beautiful Soup to scrub your input the way you
  427. want.</pre>
  428. </div>
  429. </div><div class="function">
  430. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulSoup.start_meta"></a>
  431. <a name="start_meta"></a>
  432. <div class="functionHeader">
  433. def start_meta(self, attrs):
  434. </div>
  435. <div class="functionBody">
  436. <div>Beautiful Soup can detect a charset included in a META tag, try to
  437. convert the document to that charset, and re-parse the document from the
  438. beginning.<table class="fieldTable"></table></div>
  439. </div>
  440. </div>
  441. <address>
  442. <a href="index.html">API Documentation</a> for pymine, generated by <a href="http://codespeak.net/~mwh/pydoctor/">pydoctor</a> at 2010-04-07 23:15:24.
  443. </address>
  444. </body>
  445. </html>