コード例 #1
0
ファイル: walker_ext.py プロジェクト: fdunc/bungeni-exist
 def new_cache_document(self):
     """
     Creates a new empty cache document and saves it to disk
     """
     cache_doc = DocumentHelper.createDocument()
     pinfo = ParliamentInfoParams()
     # <cachedTypes />
     cache_doc.addElement(pinfo.CACHED_TYPES)
     self.write_cache_doc_to_file(cache_doc)
コード例 #2
0
ファイル: etree.py プロジェクト: jwal/jythonlib
 def xpath(self, query, namespaces=(), **kwargs):
     variables = BrokenVariableContext(kwargs)
     xpathSelector = DocumentHelper.createXPath(query)
     xpathSelector.setNamespaceURIs(dict(namespaces))
     xpathSelector.setVariableContext(variables)
     return [Element(e) for e in xpathSelector.selectNodes(self._elem)]
コード例 #3
0
ファイル: etree.py プロジェクト: jwal/jythonlib
def parse_string(text):
    return RootTree(DocumentHelper.parseText(text))