Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#
# \remarks Defines the way to parse XML library information
#
# \author beta@blur.com
# \author Blur Studio
# \date 04/09/10
#
import os
import xml.dom.minidom
from xmlelement import XMLElement
from PyQt4.QtCore import QString
class XMLDocument(XMLElement):
""" class to ease the handling of XML documents """
def __init__(self, object=None):
if (not object):
object = xml.dom.minidom.Document()
XMLElement.__init__(self, object)
self.__file__ = ''
# TODO: Remove when all uses are gone, should no longer be needed
self.escapeDict = {}
def findElementById(self, childId):
split = child.split('::')
outTemplate = None
if (split):
outTemplate = self.root().findChildById(split[0])
index = 1
def root(self):
"""Returns the root xml node for this document.
"""
if (self._object and self._object.childNodes):
return XMLElement(self._object.childNodes[0], self.__file__)
return None
def __init__(self, object=None):
if (not object):
object = xml.dom.minidom.Document()
XMLElement.__init__(self, object)
self.__file__ = ''
# TODO: Remove when all uses are gone, should no longer be needed
self.escapeDict = {}