コード例 #1
0
ファイル: HTMLFormElement.py プロジェクト: RedTea/gaedav
 def _get_elements(self):
     #Make a collection of control elements
     nl = self.getElementsByTagName('*')
     l = []
     for child in nl:
         if child.tagName in FORM_CHILDREN:
             l.append(child)
     return implementation._4dom_createHTMLCollection(l)
コード例 #2
0
ファイル: HTMLFormElement.py プロジェクト: coowoole/gaedav
 def _get_elements(self):
     #Make a collection of control elements
     nl = self.getElementsByTagName('*')
     l = []
     for child in nl:
         if child.tagName in FORM_CHILDREN:
             l.append(child)
     return implementation._4dom_createHTMLCollection(l)
コード例 #3
0
ファイル: HTMLDocument.py プロジェクト: RedTea/gaedav
 def _4dom_getElementsByAttribute(self, tagName, attribute, attrValue=None):
     nl = self.getElementsByTagName(tagName)
     hc = implementation._4dom_createHTMLCollection()
     for elem in nl:
         attr = elem.getAttribute(attribute)
         if attrValue == None and attr != '':
             hc.append(elem)
         elif attr == attrValue:
             hc.append(elem)
     return hc
コード例 #4
0
 def _4dom_getElementsByAttribute(self, tagName, attribute, attrValue=None):
     nl = self.getElementsByTagName(tagName)
     hc = implementation._4dom_createHTMLCollection()
     for elem in nl:
         attr = elem.getAttribute(attribute)
         if attrValue == None and attr != '':
             hc.append(elem)
         elif attr == attrValue:
             hc.append(elem)
     return hc
コード例 #5
0
ファイル: HTMLTableElement.py プロジェクト: coowoole/gaedav
 def _get_rows(self):
     rows = []
     tHead = self._get_tHead()
     if tHead:
         rows.extend(list(tHead._get_rows()))
     tFoot = self._get_tFoot()
     if tFoot:
         rows.extend(list(tFoot._get_rows()))
     for tb in self._get_tBodies():
         rows.extend(list(tb._get_rows()))
     return implementation._4dom_createHTMLCollection(rows)
コード例 #6
0
ファイル: HTMLTableElement.py プロジェクト: coowoole/gaedav
 def _get_rows(self):
     rows = []
     tHead = self._get_tHead()
     if tHead:
         rows.extend(list(tHead._get_rows()))
     tFoot = self._get_tFoot()
     if tFoot:
         rows.extend(list(tFoot._get_rows()))
     for tb in self._get_tBodies():
         rows.extend(list(tb._get_rows()))
     return implementation._4dom_createHTMLCollection(rows)
コード例 #7
0
 def _get_cells(self):
     cells = []
     for child in self.childNodes:
         if child.tagName in ['TD', 'TH']:
             cells.append(child)
     return implementation._4dom_createHTMLCollection(cells)
コード例 #8
0
ファイル: HTMLMapElement.py プロジェクト: coowoole/gaedav
 def _get_areas(self):
     rt =  self.getElementsByTagName('AREA')
     return implementation._4dom_createHTMLCollection(rt)
コード例 #9
0
ファイル: HTMLDocument.py プロジェクト: RedTea/gaedav
 def _get_anchors(self):
     anchors = self.getElementsByTagName('A');
     anchors = filter(lambda x: x._get_name(), anchors)
     return implementation._4dom_createHTMLCollection(anchors)
コード例 #10
0
 def _get_options(self):
     children = self.getElementsByTagName('OPTION')
     return implementation._4dom_createHTMLCollection(children)
コード例 #11
0
 def _get_forms(self):
     forms = self.getElementsByTagName('FORM')
     return implementation._4dom_createHTMLCollection(forms)
コード例 #12
0
 def _get_links(self):
     areas = self.getElementsByTagName('AREA')
     anchors = self.getElementsByTagName('A')
     links = filter(lambda x: x._get_href(), areas + anchors)
     return implementation._4dom_createHTMLCollection(links)
コード例 #13
0
 def _get_anchors(self):
     anchors = self.getElementsByTagName('A')
     anchors = filter(lambda x: x._get_name(), anchors)
     return implementation._4dom_createHTMLCollection(anchors)
コード例 #14
0
ファイル: HTMLDocument.py プロジェクト: RedTea/gaedav
 def _get_links(self):
     areas = self.getElementsByTagName('AREA')
     anchors = self.getElementsByTagName('A')
     links = filter(lambda x: x._get_href(), areas+anchors)
     return implementation._4dom_createHTMLCollection(links)
コード例 #15
0
ファイル: HTMLDocument.py プロジェクト: RedTea/gaedav
 def _get_images(self):
     images = self.getElementsByTagName('IMG')
     return implementation._4dom_createHTMLCollection(images)
コード例 #16
0
ファイル: HTMLDocument.py プロジェクト: RedTea/gaedav
 def _get_forms(self):
     forms = self.getElementsByTagName('FORM')
     return implementation._4dom_createHTMLCollection(forms)
コード例 #17
0
ファイル: HTMLDocument.py プロジェクト: RedTea/gaedav
 def _get_applets(self):
     al = self.getElementsByTagName('APPLET')
     ol = self.getElementsByTagName('OBJECT')
     ol = filter(lambda x: x._get_code(), ol)
     return implementation._4dom_createHTMLCollection(al+ol)
コード例 #18
0
 def _get_applets(self):
     al = self.getElementsByTagName('APPLET')
     ol = self.getElementsByTagName('OBJECT')
     ol = filter(lambda x: x._get_code(), ol)
     return implementation._4dom_createHTMLCollection(al + ol)
コード例 #19
0
ファイル: HTMLTableRowElement.py プロジェクト: RedTea/gaedav
 def _get_cells(self):
     cells = []
     for child in self.childNodes:
         if child.tagName in ['TD','TH']:
             cells.append(child)
     return implementation._4dom_createHTMLCollection(cells)
コード例 #20
0
 def _get_images(self):
     images = self.getElementsByTagName('IMG')
     return implementation._4dom_createHTMLCollection(images)
コード例 #21
0
ファイル: HTMLTableElement.py プロジェクト: coowoole/gaedav
 def _get_tBodies(self):
     bodies = []
     for child in self.childNodes:
         if child.nodeName == 'TBODY':
             bodies.append(child)
     return implementation._4dom_createHTMLCollection(bodies)
コード例 #22
0
 def _get_rows(self):
     rows = []
     for child in self.childNodes:
         if child.tagName == 'TR':
             rows.append(child)
     return implementation._4dom_createHTMLCollection(rows)
コード例 #23
0
ファイル: HTMLTableElement.py プロジェクト: coowoole/gaedav
 def _get_tBodies(self):
     bodies = []
     for child in self.childNodes:
         if child.nodeName == 'TBODY':
             bodies.append(child)
     return implementation._4dom_createHTMLCollection(bodies)