diff options
Diffstat (limited to 'bs4/__init__.py')
-rw-r--r-- | bs4/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bs4/__init__.py b/bs4/__init__.py index 07795b9..fbe2914 100644 --- a/bs4/__init__.py +++ b/bs4/__init__.py @@ -193,6 +193,10 @@ class BeautifulSoup(Tag): self.tagStack = [] self.pushTag(self) + def new_tag(self, name, **attrs): + """Create a new tag associated with this soup.""" + return Tag(None, None, name, attrs) + def popTag(self): tag = self.tagStack.pop() #print "Pop", tag.name |