Created
January 2, 2013 11:41
-
-
Save vortec/4434014 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Python 2.7.3 (default, Apr 20 2012, 22:39:59) | |
| [GCC 4.6.3] on linux2 | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> from BeautifulSoup import BeautifulSoup, Tag, CData | |
| >>> s=BeautifulSoup("") | |
| >>> s=BeautifulSoup("<div></div>") | |
| >>> n=s.find('div') | |
| >>> n | |
| <div></div> | |
| >>> n.append(CData('<b>bleh</b>')) | |
| >>> n | |
| <div><![CDATA[<b>bleh</b>]]></div> | |
| >>> | |
| ----------------------- | |
| Python 2.7.2 (default, Nov 22 2011, 17:08:06) | |
| [GCC 4.4.5] on linux2 | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> from BeautifulSoup import BeautifulSoup, Tag, CData | |
| >>> s=BeautifulSoup("<div></div>") | |
| >>> n=s.find('div') | |
| >>> n.append(CData('<b>bleh</b>')) | |
| >>> n | |
| <div><![CDATA[<b>bleh</b>]]></div> | |
| >>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment