mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-25 04:32:33 -06:00
19 lines
473 B
Python
19 lines
473 B
Python
from direct.showbase import ElementTree as ET
|
|
|
|
class HTMLTree(ET.ElementTree):
|
|
def __init__(self, title):
|
|
root = ET.Element('HTML')
|
|
ET.ElementTree.__init__(self, root)
|
|
|
|
head = ET.SubElement(root, 'HEAD')
|
|
titleTag = ET.SubElement(head, 'TITLE')
|
|
titleTag.text = title
|
|
|
|
body = ET.SubElement(root, 'BODY')
|
|
|
|
def getBody(self):
|
|
return self.find('BODY')
|
|
|
|
def getHead(self):
|
|
return self.find('HEAD')
|
|
|