当前位置: 首页>>代码示例>>Python>>正文


Python Document.__init__方法代码示例

本文整理汇总了Python中xml.dom.minidom.Document.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Document.__init__方法的具体用法?Python Document.__init__怎么用?Python Document.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在xml.dom.minidom.Document的用法示例。


在下文中一共展示了Document.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
	def __init__(self, data=None):
		Document.__init__(self)

		if data is not None:
			self.__dict__ = parseString(data).__dict__

		self.annotations = { }
开发者ID:ComputerNetworks-UFRGS,项目名称:ManP2P-ng,代码行数:9,代码来源:message.py

示例2: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
    def __init__(self, mlist, addPic, featurelist):
		#def __init__(self, mlist):
		Document.__init__(self)
		self.mlist=mlist
		self.addPic=addPic
		self.featurelist=featurelist
		self.generateXML()
开发者ID:hycsam,项目名称:GUI-Test-Automation-by-Image-Recognition,代码行数:9,代码来源:realXMLGenerator.py

示例3: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
    def __init__(self, mlist, addPic, waittime, resultLoc, rangeV):
    #def __init__(self, mlist):
        Document.__init__(self)
	self.mlist=mlist
	self.addPic=addPic
	self.waittime=waittime
	self.resultLoc=resultLoc
	self.rangeV=rangeV
	self.generateXML()
开发者ID:hycsam,项目名称:GUI-Test-Automation-by-Image-Recognition,代码行数:11,代码来源:XMLgenerator+backup.py

示例4: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
 def __init__(self):
     """
     Constructor
     initialize base elements
     """
     Document.__init__(self)
     self.standalone = 'no'
     self.rws = self.createElementNS(self.RWS_URN, 'rws')
     self.rws.setAttribute('xmlns', self.RWS_URN)
     self.appendChild(self.rws)
     self.result_node = self.createElement('result')
     self.rws.appendChild(self.result_node)
开发者ID:jrivero,项目名称:WhoisDaemon,代码行数:14,代码来源:xmlFrm.py

示例5: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
 def __init__(self, session):
     """
     Create an empty Scenario XML Document, then populate it with
     objects from the given session.
     """
     Document.__init__(self)
     logger.debug('Exporting to NMF XML version 1.0')
     with session._objects_lock:
         self.scenarioPlan = ScenarioPlan(self, session)
         if session.state == EventTypes.RUNTIME_STATE.value:
             deployment = CoreDeploymentWriter(self, self.scenarioPlan, session)
             deployment.add_deployment()
             self.scenarioPlan.setAttribute('deployed', 'true')
开发者ID:gsomlo,项目名称:core,代码行数:15,代码来源:xmlwriter1.py

示例6: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
 def __init__(self, session):
     ''' Create an empty Scenario XML Document, then populate it with
     objects from the given session.
     '''
     Document.__init__(self)
     session.info('Exporting to NMF XML version 1.0')
     with session._objslock:
         self.scenarioPlan = ScenarioPlan(self, session)
         if session.getstate() == coreapi.CORE_EVENT_RUNTIME_STATE:
             deployment = CoreDeploymentWriter(self, self.scenarioPlan,
                                               session)
             deployment.add_deployment()
             self.scenarioPlan.setAttribute('deployed', 'true')
开发者ID:DINKIN,项目名称:coreemu,代码行数:15,代码来源:xmlwriter1.py

示例7: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
 def __init__(self, styleSheetUrl="\"proviola.xsl" + "\""):
   Document.__init__(self)
   self.frameNumber = 0
   self.film = self.createElement("film")
   
   styleSheetRef = self.createProcessingInstruction("xml-stylesheet",\
                                                    "type=\"text/xsl\" href=" + styleSheetUrl)
   
   self.appendChild(styleSheetRef)
   
   movie = self.createElement("movie")
   self.appendChild(movie)
   movie.appendChild(self.film)
开发者ID:JasonGross,项目名称:proviola-source,代码行数:15,代码来源:FilmDocument.py

示例8: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
    def __init__(self):
        Document.__init__(self)
        
        self.top = self.createElementNS("http://www.ctcms.nist.gov/fipy", "FiPy")
        Document.appendChild(self, self.top)
        
        self.appendChild(self.tupleToXML(sys.argv, "sys.argv"))
                     
        version = self.createElement("version")
        self.appendChild(version)
        version.appendChild(self.createTextNode(fipy.__version__))
        
        path = self.createElement("path")
        fipypath = os.path.dirname(fipy.__file__)
        path.appendChild(self.createTextNode(fipypath))
        self.appendChild(path)

        self.appendChild(self.svn(fipypath))
                                                   
        self.appendChild(self.dictToXML(os.environ, "environ"))
        
        pyth = self.createElement("python")
        
        implementation = self.createElement("implementation")
        if hasattr(platform, "python_implementation"):
            implementation.appendChild(self.createTextNode(platform.python_implementation()))
        else:
            implementation.appendChild(self.createTextNode("unknown"))
        pyth.appendChild(implementation)

        pversion = self.createElement("version")
        pversion.appendChild(self.createTextNode(platform.python_version()))
        pyth.appendChild(pversion)

        compiler = self.createElement("compiler")
        compiler.appendChild(self.createTextNode(platform.python_compiler()))
        pyth.appendChild(compiler)

        pyth.appendChild(self.tupleToXML(platform.python_build(), "build",
                                         keys=("buildno", "builddate")))

        pyth.appendChild(self.tupleToXML(platform.architecture(), "architecture",
                                         keys=("bits", "linkage")))

        pyth.appendChild(self.tupleToXML(platform.uname(), "uname",
                                         keys=("system", "node", "release", "version", "machine", "processor")))
            
        self.appendChild(pyth)
开发者ID:LWhitson2,项目名称:fipy,代码行数:50,代码来源:vitals.py

示例9: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
    def __init__(self, alertType):
        Document.__init__(self)
        self.root_node = self.createElement(alertType)
        self.root_node.setAttribute('version', XML_INTERFACE_VERSION)

        self.authkey_node = self.createElement('authkey')
        self.authkey_node.setAttribute('category', AUTH_CATEGORY)

        self.date_node = self.createElement('date')

        self.contact_name_node = self.createElement('contact-name')
        self.contact_mail_node = self.createElement('contact-mail')

        self.root_node.appendChild(self.authkey_node)
        self.root_node.appendChild(self.date_node)
        self.root_node.appendChild(self.contact_name_node)
        self.root_node.appendChild(self.contact_mail_node)

        self.appendChild(self.root_node)
开发者ID:thomas-krenn,项目名称:TKmon,代码行数:21,代码来源:data.py

示例10: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
    def __init__(self, session):
        """ Create an empty Scenario XML Document, then populate it with
        objects from the given session.
        """
        Document.__init__(self)
        self.session = session
        self.scenario = self.createElement("Scenario")
        self.np = self.createElement("NetworkPlan")
        self.mp = self.createElement("MotionPlan")
        self.sp = self.createElement("ServicePlan")
        self.meta = self.createElement("CoreMetaData")

        self.appendChild(self.scenario)
        self.scenario.appendChild(self.np)
        self.scenario.appendChild(self.mp)
        self.scenario.appendChild(self.sp)
        self.scenario.appendChild(self.meta)

        self.populatefromsession()
开发者ID:guougangxue,项目名称:core,代码行数:21,代码来源:xmlwriter0.py

示例11: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
 def __init__(self):
     Document.encoding = 'utf-8'
     Document.__init__(self)
     self.tree = None
     self.child_tree = None
     self.graph = None
开发者ID:leonindy,项目名称:cat,代码行数:8,代码来源:utils.py

示例12: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
 def __init__(self):
     Document.__init__(self)
开发者ID:punitharam,项目名称:RGT-tool,代码行数:4,代码来源:svgDOMImplementation.py

示例13: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
 def __init__(self, root_element):
     Document.__init__(self)
     self.appendChild(root_element)
开发者ID:eeejay,项目名称:specular,代码行数:5,代码来源:specular_serial.py

示例14: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
 def __init__(self):
     Document.__init__(self)
     self.coll = self.createElement("collection")
     self.appendChild(self.coll)
     self.__NrOfRecords = 0
开发者ID:pazera,项目名称:hgf-invenio,代码行数:7,代码来源:MarcXML_hgf.py

示例15: __init__

# 需要导入模块: from xml.dom.minidom import Document [as 别名]
# 或者: from xml.dom.minidom.Document import __init__ [as 别名]
 def __init__(self):
     '''Initializes base Document DOM class'''
     Document.__init__(self)
开发者ID:lcrees,项目名称:psilib,代码行数:5,代码来源:som.py


注:本文中的xml.dom.minidom.Document.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。