PageRenderTime 55ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

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

http://pymine.googlecode.com/
HTML | 861 lines | 603 code | 258 blank | 0 comment | 0 complexity | 7365c326a6f4d7363313f5dd41a5832a 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.BeautifulStoneSoup&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.BeautifulStoneSoup(<a href="pymine.beautifulsoup.BeautifulSoup.Tag.html">Tag</a>, <span title="sgmllib.SGMLParser">SGMLParser</span>):</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.BeautifulStoneSoup">View In Hierarchy</a>
  15. </p>
  16. <div>
  17. <p>Known subclasses: <a href="pymine.beautifulsoup.BeautifulSoup.BeautifulSOAP.html">pymine.beautifulsoup.BeautifulSoup.BeautifulSOAP</a>, <a href="pymine.beautifulsoup.BeautifulSoup.BeautifulSoup.html">pymine.beautifulsoup.BeautifulSoup.BeautifulSoup</a>, <a href="pymine.beautifulsoup.BeautifulSoup.RobustXMLParser.html">pymine.beautifulsoup.BeautifulSoup.RobustXMLParser</a></p>
  18. </div>
  19. <pre>This class contains the basic parser and search code. It defines
  20. a parser that knows nothing about tag behavior except for the
  21. following:
  22. You can't close a tag without closing all the tags it encloses.
  23. That is, "&lt;foo&gt;&lt;bar&gt;&lt;/foo&gt;" actually means
  24. "&lt;foo&gt;&lt;bar&gt;&lt;/bar&gt;&lt;/foo&gt;".
  25. [Another possible explanation is "&lt;foo&gt;&lt;bar /&gt;&lt;/foo&gt;", but since
  26. this class defines no SELF_CLOSING_TAGS, it will never use that
  27. explanation.]
  28. This class is useful for parsing XML or made-up markup languages,
  29. or when BeautifulSoup makes an assumption counter to what you were
  30. expecting.</pre>
  31. <div id="splitTables">
  32. <table class="children sortable" id="id64">
  33. <tr class="method">
  34. <td>Method</td>
  35. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#__init__">__init__</a></td>
  36. <td><span>The Soup object is initialized as the 'root tag', and the</span></td>
  37. </tr><tr class="method">
  38. <td>Method</td>
  39. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#convert_charref">convert_charref</a></td>
  40. <td><span>This method fixes a bug in Python's SGMLParser.</span></td>
  41. </tr><tr class="method">
  42. <td>Method</td>
  43. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#_feed">_feed</a></td>
  44. <td><span class="undocumented">Undocumented</span></td>
  45. </tr><tr class="method">
  46. <td>Method</td>
  47. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#__getattr__">__getattr__</a></td>
  48. <td><span>This method routes method call requests to either the SGMLParser</span></td>
  49. </tr><tr class="method">
  50. <td>Method</td>
  51. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#isSelfClosingTag">isSelfClosingTag</a></td>
  52. <td><span>Returns true iff the given string is the name of a</span></td>
  53. </tr><tr class="method">
  54. <td>Method</td>
  55. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#reset">reset</a></td>
  56. <td><span class="undocumented">Undocumented</span></td>
  57. </tr><tr class="method">
  58. <td>Method</td>
  59. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#popTag">popTag</a></td>
  60. <td><span class="undocumented">Undocumented</span></td>
  61. </tr><tr class="method">
  62. <td>Method</td>
  63. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#pushTag">pushTag</a></td>
  64. <td><span class="undocumented">Undocumented</span></td>
  65. </tr><tr class="method">
  66. <td>Method</td>
  67. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#endData">endData</a></td>
  68. <td><span class="undocumented">Undocumented</span></td>
  69. </tr><tr class="method">
  70. <td>Method</td>
  71. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#_popToTag">_popToTag</a></td>
  72. <td><span>Pops the tag stack up to and including the most recent</span></td>
  73. </tr><tr class="method">
  74. <td>Method</td>
  75. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#_smartPop">_smartPop</a></td>
  76. <td><span>We need to pop up to the previous tag of this type, unless</span></td>
  77. </tr><tr class="method">
  78. <td>Method</td>
  79. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#unknown_starttag">unknown_starttag</a></td>
  80. <td><span class="undocumented">Undocumented</span></td>
  81. </tr><tr class="method">
  82. <td>Method</td>
  83. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#unknown_endtag">unknown_endtag</a></td>
  84. <td><span class="undocumented">Undocumented</span></td>
  85. </tr><tr class="method">
  86. <td>Method</td>
  87. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#handle_data">handle_data</a></td>
  88. <td><span class="undocumented">Undocumented</span></td>
  89. </tr><tr class="method">
  90. <td>Method</td>
  91. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#_toStringSubclass">_toStringSubclass</a></td>
  92. <td><span>Adds a certain piece of text to the tree as a NavigableString</span></td>
  93. </tr><tr class="method">
  94. <td>Method</td>
  95. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#handle_pi">handle_pi</a></td>
  96. <td><span>Handle a processing instruction as a ProcessingInstruction</span></td>
  97. </tr><tr class="method">
  98. <td>Method</td>
  99. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#handle_comment">handle_comment</a></td>
  100. <td><span>Handle comments as Comment objects.</span></td>
  101. </tr><tr class="method">
  102. <td>Method</td>
  103. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#handle_charref">handle_charref</a></td>
  104. <td><span>Handle character references as data.</span></td>
  105. </tr><tr class="method">
  106. <td>Method</td>
  107. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#handle_entityref">handle_entityref</a></td>
  108. <td><span>Handle entity references as data, possibly converting known</span></td>
  109. </tr><tr class="method">
  110. <td>Method</td>
  111. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#handle_decl">handle_decl</a></td>
  112. <td><span>Handle DOCTYPEs and the like as Declaration objects.</span></td>
  113. </tr><tr class="method">
  114. <td>Method</td>
  115. <td><a href="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.html#parse_declaration">parse_declaration</a></td>
  116. <td><span>Treat a bogus SGML declaration as raw data. Treat a CDATA</span></td>
  117. </tr>
  118. </table>
  119. <p>
  120. Inherited from <a href="pymine.beautifulsoup.BeautifulSoup.Tag.html">Tag</a>:
  121. </p>
  122. <table class="children sortable" id="id65">
  123. <tr class="basemethod">
  124. <td>Method</td>
  125. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#_invert">_invert</a></td>
  126. <td><span>Cheap function to invert a hash.</span></td>
  127. </tr><tr class="basemethod">
  128. <td>Method</td>
  129. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#_convertEntities">_convertEntities</a></td>
  130. <td><span>Used in a call to re.sub to replace HTML, XML, and numeric</span></td>
  131. </tr><tr class="basemethod">
  132. <td>Method</td>
  133. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#getString">getString</a></td>
  134. <td><span class="undocumented">Undocumented</span></td>
  135. </tr><tr class="basemethod">
  136. <td>Method</td>
  137. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#setString">setString</a></td>
  138. <td><span>Replace the contents of the tag with a string</span></td>
  139. </tr><tr class="basemethod">
  140. <td>Method</td>
  141. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#getText">getText</a></td>
  142. <td><span class="undocumented">Undocumented</span></td>
  143. </tr><tr class="basemethod">
  144. <td>Method</td>
  145. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#get">get</a></td>
  146. <td><span>Returns the value of the 'key' attribute for the tag, or</span></td>
  147. </tr><tr class="basemethod">
  148. <td>Method</td>
  149. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#clear">clear</a></td>
  150. <td><span>Extract all children.</span></td>
  151. </tr><tr class="basemethod">
  152. <td>Method</td>
  153. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#index">index</a></td>
  154. <td><span class="undocumented">Undocumented</span></td>
  155. </tr><tr class="basemethod">
  156. <td>Method</td>
  157. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#has_key">has_key</a></td>
  158. <td><span class="undocumented">Undocumented</span></td>
  159. </tr><tr class="basemethod">
  160. <td>Method</td>
  161. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__getitem__">__getitem__</a></td>
  162. <td><span>tag[key] returns the value of the 'key' attribute for the tag,</span></td>
  163. </tr><tr class="basemethod">
  164. <td>Method</td>
  165. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__iter__">__iter__</a></td>
  166. <td><span>Iterating over a tag iterates over its contents.</span></td>
  167. </tr><tr class="basemethod">
  168. <td>Method</td>
  169. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__len__">__len__</a></td>
  170. <td><span>The length of a tag is the length of its list of contents.</span></td>
  171. </tr><tr class="basemethod">
  172. <td>Method</td>
  173. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__contains__">__contains__</a></td>
  174. <td><span class="undocumented">Undocumented</span></td>
  175. </tr><tr class="basemethod">
  176. <td>Method</td>
  177. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__nonzero__">__nonzero__</a></td>
  178. <td><span>A tag is non-None even if it has no contents.</span></td>
  179. </tr><tr class="basemethod">
  180. <td>Method</td>
  181. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__setitem__">__setitem__</a></td>
  182. <td><span>Setting tag[key] sets the value of the 'key' attribute for the</span></td>
  183. </tr><tr class="basemethod">
  184. <td>Method</td>
  185. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__delitem__">__delitem__</a></td>
  186. <td><span>Deleting tag[key] deletes all 'key' attributes for the tag.</span></td>
  187. </tr><tr class="basemethod">
  188. <td>Method</td>
  189. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__call__">__call__</a></td>
  190. <td><span>Calling a tag like a function is the same as calling its</span></td>
  191. </tr><tr class="basemethod">
  192. <td>Method</td>
  193. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__eq__">__eq__</a></td>
  194. <td><span>Returns true iff this tag has the same name, the same attributes,</span></td>
  195. </tr><tr class="basemethod">
  196. <td>Method</td>
  197. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__ne__">__ne__</a></td>
  198. <td><span>Returns true iff this tag is not identical to the other tag,</span></td>
  199. </tr><tr class="basemethod">
  200. <td>Method</td>
  201. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__repr__">__repr__</a></td>
  202. <td><span>Renders this tag as a string.</span></td>
  203. </tr><tr class="basemethod">
  204. <td>Method</td>
  205. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__unicode__">__unicode__</a></td>
  206. <td><span class="undocumented">Undocumented</span></td>
  207. </tr><tr class="basemethod">
  208. <td>Method</td>
  209. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#_sub_entity">_sub_entity</a></td>
  210. <td><span>Used with a regular expression to substitute the</span></td>
  211. </tr><tr class="basemethod">
  212. <td>Method</td>
  213. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__str__">__str__</a></td>
  214. <td><span>Returns a string or Unicode representation of this tag and</span></td>
  215. </tr><tr class="basemethod">
  216. <td>Method</td>
  217. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#decompose">decompose</a></td>
  218. <td><span>Recursively destroys the contents of this tree.</span></td>
  219. </tr><tr class="basemethod">
  220. <td>Method</td>
  221. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#prettify">prettify</a></td>
  222. <td><span class="undocumented">Undocumented</span></td>
  223. </tr><tr class="basemethod">
  224. <td>Method</td>
  225. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#renderContents">renderContents</a></td>
  226. <td><span>Renders the contents of this tag as a string in the given</span></td>
  227. </tr><tr class="basemethod">
  228. <td>Method</td>
  229. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#find">find</a></td>
  230. <td><span>Return only the first child of this Tag matching the given</span></td>
  231. </tr><tr class="basemethod">
  232. <td>Method</td>
  233. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#findAll">findAll</a></td>
  234. <td><span>Extracts a list of Tag objects that match the given</span></td>
  235. </tr><tr class="basemethod">
  236. <td>Method</td>
  237. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#fetchText">fetchText</a></td>
  238. <td><span class="undocumented">Undocumented</span></td>
  239. </tr><tr class="basemethod">
  240. <td>Method</td>
  241. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#firstText">firstText</a></td>
  242. <td><span class="undocumented">Undocumented</span></td>
  243. </tr><tr class="basemethod">
  244. <td>Method</td>
  245. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#_getAttrMap">_getAttrMap</a></td>
  246. <td><span>Initializes a map representation of this tag's attributes,</span></td>
  247. </tr><tr class="basemethod">
  248. <td>Method</td>
  249. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#childGenerator">childGenerator</a></td>
  250. <td><span class="undocumented">Undocumented</span></td>
  251. </tr><tr class="basemethod">
  252. <td>Method</td>
  253. <td><a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#recursiveChildGenerator">recursiveChildGenerator</a></td>
  254. <td><span class="undocumented">Undocumented</span></td>
  255. </tr>
  256. </table>
  257. <p>
  258. Inherited from <a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html">PageElement</a> (via <a href="pymine.beautifulsoup.BeautifulSoup.Tag.html">Tag</a>):
  259. </p>
  260. <table class="children sortable" id="id66">
  261. <tr class="basemethod">
  262. <td>Method</td>
  263. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#setup">setup</a></td>
  264. <td><span>Sets up the initial relations between this element and</span></td>
  265. </tr><tr class="basemethod">
  266. <td>Method</td>
  267. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#replaceWith">replaceWith</a></td>
  268. <td><span class="undocumented">Undocumented</span></td>
  269. </tr><tr class="basemethod">
  270. <td>Method</td>
  271. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#replaceWithChildren">replaceWithChildren</a></td>
  272. <td><span class="undocumented">Undocumented</span></td>
  273. </tr><tr class="basemethod">
  274. <td>Method</td>
  275. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#extract">extract</a></td>
  276. <td><span>Destructively rips this element out of the tree.</span></td>
  277. </tr><tr class="basemethod">
  278. <td>Method</td>
  279. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#_lastRecursiveChild">_lastRecursiveChild</a></td>
  280. <td><span>Finds the last element beneath this object to be parsed.</span></td>
  281. </tr><tr class="basemethod">
  282. <td>Method</td>
  283. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#insert">insert</a></td>
  284. <td><span class="undocumented">Undocumented</span></td>
  285. </tr><tr class="basemethod">
  286. <td>Method</td>
  287. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#append">append</a></td>
  288. <td><span>Appends the given tag to the contents of this tag.</span></td>
  289. </tr><tr class="basemethod">
  290. <td>Method</td>
  291. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findNext">findNext</a></td>
  292. <td><span>Returns the first item that matches the given criteria and</span></td>
  293. </tr><tr class="basemethod">
  294. <td>Method</td>
  295. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findAllNext">findAllNext</a></td>
  296. <td><span>Returns all items that match the given criteria and appear</span></td>
  297. </tr><tr class="basemethod">
  298. <td>Method</td>
  299. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findNextSibling">findNextSibling</a></td>
  300. <td><span>Returns the closest sibling to this Tag that matches the</span></td>
  301. </tr><tr class="basemethod">
  302. <td>Method</td>
  303. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findNextSiblings">findNextSiblings</a></td>
  304. <td><span>Returns the siblings of this Tag that match the given</span></td>
  305. </tr><tr class="basemethod">
  306. <td>Method</td>
  307. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findPrevious">findPrevious</a></td>
  308. <td><span>Returns the first item that matches the given criteria and</span></td>
  309. </tr><tr class="basemethod">
  310. <td>Method</td>
  311. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findAllPrevious">findAllPrevious</a></td>
  312. <td><span>Returns all items that match the given criteria and appear</span></td>
  313. </tr><tr class="basemethod">
  314. <td>Method</td>
  315. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findPreviousSibling">findPreviousSibling</a></td>
  316. <td><span>Returns the closest sibling to this Tag that matches the</span></td>
  317. </tr><tr class="basemethod">
  318. <td>Method</td>
  319. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findPreviousSiblings">findPreviousSiblings</a></td>
  320. <td><span>Returns the siblings of this Tag that match the given</span></td>
  321. </tr><tr class="basemethod">
  322. <td>Method</td>
  323. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findParent">findParent</a></td>
  324. <td><span>Returns the closest parent of this Tag that matches the given</span></td>
  325. </tr><tr class="basemethod">
  326. <td>Method</td>
  327. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#findParents">findParents</a></td>
  328. <td><span>Returns the parents of this Tag that match the given</span></td>
  329. </tr><tr class="basemethod">
  330. <td>Method</td>
  331. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#_findOne">_findOne</a></td>
  332. <td><span class="undocumented">Undocumented</span></td>
  333. </tr><tr class="basemethod">
  334. <td>Method</td>
  335. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#_findAll">_findAll</a></td>
  336. <td><span>Iterates over a generator looking for things that match.</span></td>
  337. </tr><tr class="basemethod">
  338. <td>Method</td>
  339. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#nextGenerator">nextGenerator</a></td>
  340. <td><span class="undocumented">Undocumented</span></td>
  341. </tr><tr class="basemethod">
  342. <td>Method</td>
  343. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#nextSiblingGenerator">nextSiblingGenerator</a></td>
  344. <td><span class="undocumented">Undocumented</span></td>
  345. </tr><tr class="basemethod">
  346. <td>Method</td>
  347. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#previousGenerator">previousGenerator</a></td>
  348. <td><span class="undocumented">Undocumented</span></td>
  349. </tr><tr class="basemethod">
  350. <td>Method</td>
  351. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#previousSiblingGenerator">previousSiblingGenerator</a></td>
  352. <td><span class="undocumented">Undocumented</span></td>
  353. </tr><tr class="basemethod">
  354. <td>Method</td>
  355. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#parentGenerator">parentGenerator</a></td>
  356. <td><span class="undocumented">Undocumented</span></td>
  357. </tr><tr class="basemethod">
  358. <td>Method</td>
  359. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#substituteEncoding">substituteEncoding</a></td>
  360. <td><span class="undocumented">Undocumented</span></td>
  361. </tr><tr class="basemethod">
  362. <td>Method</td>
  363. <td><a href="pymine.beautifulsoup.BeautifulSoup.PageElement.html#toEncoding">toEncoding</a></td>
  364. <td><span>Encodes an object to a string in some encoding, or to Unicode.</span></td>
  365. </tr>
  366. </table>
  367. </div>
  368. <div class="function">
  369. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.__init__"></a>
  370. <a name="__init__"></a>
  371. <div class="functionHeader">
  372. def __init__(self, markup='', parseOnlyThese=None, fromEncoding=None, markupMassage=True, smartQuotesTo=XML_ENTITIES, convertEntities=None, selfClosingTags=None, isHTML=False):
  373. </div>
  374. <div class="functionBody">
  375. <div class="interfaceinfo">overrides <a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__init__">pymine.beautifulsoup.BeautifulSoup.Tag.__init__</a></div><div class="interfaceinfo">overridden in <a href="pymine.beautifulsoup.BeautifulSoup.BeautifulSoup.html">pymine.beautifulsoup.BeautifulSoup.BeautifulSoup</a></div>
  376. <pre>The Soup object is initialized as the 'root tag', and the
  377. provided markup (which can be a string or a file-like object)
  378. is fed into the underlying parser.
  379. sgmllib will process most bad HTML, and the BeautifulSoup
  380. class has some tricks for dealing with some HTML that kills
  381. sgmllib, but Beautiful Soup can nonetheless choke or lose data
  382. if your data uses self-closing tags or declarations
  383. incorrectly.
  384. By default, Beautiful Soup uses regexes to sanitize input,
  385. avoiding the vast majority of these problems. If the problems
  386. don't apply to you, pass in False for markupMassage, and
  387. you'll get better performance.
  388. The default parser massage techniques fix the two most common
  389. instances of invalid HTML that choke sgmllib:
  390. &lt;br/&gt; (No space between name of closing tag and tag close)
  391. &lt;! --Comment--&gt; (Extraneous whitespace in declaration)
  392. You can pass in a custom list of (RE object, replace method)
  393. tuples to get Beautiful Soup to scrub your input the way you
  394. want.</pre>
  395. </div>
  396. </div><div class="function">
  397. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.convert_charref"></a>
  398. <a name="convert_charref"></a>
  399. <div class="functionHeader">
  400. def convert_charref(self, name):
  401. </div>
  402. <div class="functionBody">
  403. <div>This method fixes a bug in Python's SGMLParser.<table class="fieldTable"></table></div>
  404. </div>
  405. </div><div class="function">
  406. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup._feed"></a>
  407. <a name="_feed"></a>
  408. <div class="functionHeader">
  409. def _feed(self, inDocumentEncoding=None, isHTML=False):
  410. </div>
  411. <div class="functionBody">
  412. <div class="undocumented">Undocumented</div>
  413. </div>
  414. </div><div class="function">
  415. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.__getattr__"></a>
  416. <a name="__getattr__"></a>
  417. <div class="functionHeader">
  418. def __getattr__(self, methodName):
  419. </div>
  420. <div class="functionBody">
  421. <div class="interfaceinfo">overrides <a href="pymine.beautifulsoup.BeautifulSoup.Tag.html#__getattr__">pymine.beautifulsoup.BeautifulSoup.Tag.__getattr__</a></div>
  422. <div>This method routes method call requests to either the SGMLParser
  423. superclass or the Tag superclass, depending on the method name.<table class="fieldTable"></table></div>
  424. </div>
  425. </div><div class="function">
  426. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.isSelfClosingTag"></a>
  427. <a name="isSelfClosingTag"></a>
  428. <div class="functionHeader">
  429. def isSelfClosingTag(self, name):
  430. </div>
  431. <div class="functionBody">
  432. <div>Returns true iff the given string is the name of a self-closing tag
  433. according to this parser.<table class="fieldTable"></table></div>
  434. </div>
  435. </div><div class="function">
  436. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.reset"></a>
  437. <a name="reset"></a>
  438. <div class="functionHeader">
  439. def reset(self):
  440. </div>
  441. <div class="functionBody">
  442. <div class="undocumented">Undocumented</div>
  443. </div>
  444. </div><div class="function">
  445. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.popTag"></a>
  446. <a name="popTag"></a>
  447. <div class="functionHeader">
  448. def popTag(self):
  449. </div>
  450. <div class="functionBody">
  451. <div class="interfaceinfo">overridden in <a href="pymine.beautifulsoup.BeautifulSoup.BeautifulSOAP.html">pymine.beautifulsoup.BeautifulSoup.BeautifulSOAP</a></div>
  452. <div class="undocumented">Undocumented</div>
  453. </div>
  454. </div><div class="function">
  455. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.pushTag"></a>
  456. <a name="pushTag"></a>
  457. <div class="functionHeader">
  458. def pushTag(self, tag):
  459. </div>
  460. <div class="functionBody">
  461. <div class="undocumented">Undocumented</div>
  462. </div>
  463. </div><div class="function">
  464. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.endData"></a>
  465. <a name="endData"></a>
  466. <div class="functionHeader">
  467. def endData(self, containerClass=NavigableString):
  468. </div>
  469. <div class="functionBody">
  470. <div class="undocumented">Undocumented</div>
  471. </div>
  472. </div><div class="function">
  473. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup._popToTag"></a>
  474. <a name="_popToTag"></a>
  475. <div class="functionHeader">
  476. def _popToTag(self, name, inclusivePop=True):
  477. </div>
  478. <div class="functionBody">
  479. <div>Pops the tag stack up to and including the most recent instance of the
  480. given tag. If inclusivePop is false, pops the tag stack up to but *not*
  481. including the most recent instqance of the given tag.<table class="fieldTable"></table></div>
  482. </div>
  483. </div><div class="function">
  484. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup._smartPop"></a>
  485. <a name="_smartPop"></a>
  486. <div class="functionHeader">
  487. def _smartPop(self, name):
  488. </div>
  489. <div class="functionBody">
  490. <pre>We need to pop up to the previous tag of this type, unless
  491. one of this tag's nesting reset triggers comes between this
  492. tag and the previous tag of this type, OR unless this tag is a
  493. generic nesting trigger and another generic nesting trigger
  494. comes between this tag and the previous tag of this type.
  495. Examples:
  496. &lt;p&gt;Foo&lt;b&gt;Bar *&lt;p&gt;* should pop to 'p', not 'b'.
  497. &lt;p&gt;Foo&lt;table&gt;Bar *&lt;p&gt;* should pop to 'table', not 'p'.
  498. &lt;p&gt;Foo&lt;table&gt;&lt;tr&gt;Bar *&lt;p&gt;* should pop to 'tr', not 'p'.
  499. &lt;li&gt;&lt;ul&gt;&lt;li&gt; *&lt;li&gt;* should pop to 'ul', not the first 'li'.
  500. &lt;tr&gt;&lt;table&gt;&lt;tr&gt; *&lt;tr&gt;* should pop to 'table', not the first 'tr'
  501. &lt;td&gt;&lt;tr&gt;&lt;td&gt; *&lt;td&gt;* should pop to 'tr', not the first 'td'</pre>
  502. </div>
  503. </div><div class="function">
  504. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.unknown_starttag"></a>
  505. <a name="unknown_starttag"></a>
  506. <div class="functionHeader">
  507. def unknown_starttag(self, name, attrs, selfClosing=0):
  508. </div>
  509. <div class="functionBody">
  510. <div class="undocumented">Undocumented</div>
  511. </div>
  512. </div><div class="function">
  513. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.unknown_endtag"></a>
  514. <a name="unknown_endtag"></a>
  515. <div class="functionHeader">
  516. def unknown_endtag(self, name):
  517. </div>
  518. <div class="functionBody">
  519. <div class="undocumented">Undocumented</div>
  520. </div>
  521. </div><div class="function">
  522. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.handle_data"></a>
  523. <a name="handle_data"></a>
  524. <div class="functionHeader">
  525. def handle_data(self, data):
  526. </div>
  527. <div class="functionBody">
  528. <div class="undocumented">Undocumented</div>
  529. </div>
  530. </div><div class="function">
  531. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup._toStringSubclass"></a>
  532. <a name="_toStringSubclass"></a>
  533. <div class="functionHeader">
  534. def _toStringSubclass(self, text, subclass):
  535. </div>
  536. <div class="functionBody">
  537. <div>Adds a certain piece of text to the tree as a NavigableString
  538. subclass.<table class="fieldTable"></table></div>
  539. </div>
  540. </div><div class="function">
  541. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.handle_pi"></a>
  542. <a name="handle_pi"></a>
  543. <div class="functionHeader">
  544. def handle_pi(self, text):
  545. </div>
  546. <div class="functionBody">
  547. <div>Handle a processing instruction as a ProcessingInstruction object,
  548. possibly one with a %SOUP-ENCODING% slot into which an encoding will be
  549. plugged later.<table class="fieldTable"></table></div>
  550. </div>
  551. </div><div class="function">
  552. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.handle_comment"></a>
  553. <a name="handle_comment"></a>
  554. <div class="functionHeader">
  555. def handle_comment(self, text):
  556. </div>
  557. <div class="functionBody">
  558. <div>Handle comments as Comment objects.<table class="fieldTable"></table></div>
  559. </div>
  560. </div><div class="function">
  561. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.handle_charref"></a>
  562. <a name="handle_charref"></a>
  563. <div class="functionHeader">
  564. def handle_charref(self, ref):
  565. </div>
  566. <div class="functionBody">
  567. <div>Handle character references as data.<table class="fieldTable"></table></div>
  568. </div>
  569. </div><div class="function">
  570. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.handle_entityref"></a>
  571. <a name="handle_entityref"></a>
  572. <div class="functionHeader">
  573. def handle_entityref(self, ref):
  574. </div>
  575. <div class="functionBody">
  576. <div>Handle entity references as data, possibly converting known HTML and/or
  577. XML entity references to the corresponding Unicode characters.<table class="fieldTable"></table></div>
  578. </div>
  579. </div><div class="function">
  580. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.handle_decl"></a>
  581. <a name="handle_decl"></a>
  582. <div class="functionHeader">
  583. def handle_decl(self, data):
  584. </div>
  585. <div class="functionBody">
  586. <div>Handle DOCTYPEs and the like as Declaration objects.<table class="fieldTable"></table></div>
  587. </div>
  588. </div><div class="function">
  589. <a name="pymine.beautifulsoup.BeautifulSoup.BeautifulStoneSoup.parse_declaration"></a>
  590. <a name="parse_declaration"></a>
  591. <div class="functionHeader">
  592. def parse_declaration(self, i):
  593. </div>
  594. <div class="functionBody">
  595. <div>Treat a bogus SGML declaration as raw data. Treat a CDATA declaration as
  596. a CData object.<table class="fieldTable"></table></div>
  597. </div>
  598. </div>
  599. <address>
  600. <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.
  601. </address>
  602. </body>
  603. </html>