E5XML/XMLStreamReaderBase.py

changeset 589
a9a4620f6767
parent 578
a0ecb2c68208
child 590
beb60b9b3d8d
equal deleted inserted replaced
588:573767cf6bde 589:a9a4620f6767
42 Public method to show an error message. 42 Public method to show an error message.
43 """ 43 """
44 if self.hasError(): 44 if self.hasError():
45 msg = QCoreApplication.translate("XMLStreamReaderBase", 45 msg = QCoreApplication.translate("XMLStreamReaderBase",
46 "<p>XML parse error in file <b>{0}</b>, line {1}, column {2}<p>" 46 "<p>XML parse error in file <b>{0}</b>, line {1}, column {2}<p>"
47 "<p>Error: {3}").format(self.device.fileName(), 47 "<p>Error: {3}").format(self.device().fileName(),
48 self.lineNumber(), self.columnNumber(), self.errorString()) 48 self.lineNumber(), self.columnNumber(), self.errorString())
49 E5MessageBox.warning(None, 49 E5MessageBox.warning(None,
50 self.trUtf8("XML parse error"), 50 QCoreApplication.translate("XMLStreamReaderBase", "XML parse error"),
51 self.trUtf8(msg)) 51 msg)
52 52
53 def raiseUnexpectedStartTag(self, tag):
54 """
55 Public method to raise an error for an unexpected start tag.
56
57 @param tag name of the unexpected tag (string)
58 """
59 self.raiseError(QCoreApplication.translate("XMLStreamReaderBase",
60 "Unexpected start tag '{0}'.".format(tag)))
53 61
54 def readXML(self): 62 def readXML(self):
55 """ 63 """
56 Public method to read and parse the XML document. 64 Public method to read and parse the XML document.
57 """ 65 """

eric ide

mercurial