Questions tagged [qdomdocument]

In Qt, the QDomDocument class represents an XML document.

In Qt, the QDomDocument class represents an XML document.

The QDomDocument class represents the entire XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data.

Useful link

32 questions
0
votes
0 answers

Qt, C++, XML reader crashes/freezes when I try parsing deeper data values

In an earlier Question I asked about why my program/QTcpServer was crashing all the time, and I really appreciate the help I got from everyone. However, I have decided to try and rebuild the Program from scratch in order to see why it crashes, and I…
0
votes
1 answer

QDomElement::text() without child element texts?

I have an xml like: 1 2 3 and a recursive function that parses QDomDocument that wraps it. The function iterates QDomNodes, converting them into QDomElements and calls text() method to get data. Unfortunately…
truf
  • 2,843
  • 26
  • 39
0
votes
1 answer

QT 5.11.3 - QDomNode : can't print value of dom element

I'm trying to create a very function to read a very simple XML file and print its content on the QTCreator console. I created the following XML file : Test scanner 10102030
Eox
  • 133
  • 1
  • 10
0
votes
1 answer

Cannot divide xml elements of one QDomDocument() node and append the elements to the DOM model with pyqt5

I have this code that works so far, to have a direct tree view of an xml file: from PyQt5.QtCore import QAbstractItemModel, QFile, QIODevice, QModelIndex, Qt from PyQt5.QtWidgets import QApplication, QFileDialog, QMainWindow, QTreeView from…
rustyBucketBay
  • 4,320
  • 3
  • 17
  • 47
0
votes
1 answer

QDomDocument: setContent error with XML tag

I am trying to set my XML file to QDomDocument using setContent and it returns an error. My XML file: 5 5
Ankur Shah
  • 125
  • 12
0
votes
0 answers

Reading XML File with QDomDocument failure

As part of a project to create an address book, I have to make the backup in XML File. I use QDomDoc etc, the writing was functional but the reading/parsing of the xml file fail at settingContent of QDomDoc. I watched a lot of forums with examples…
GauloiZ
  • 1
  • 2
0
votes
1 answer

Read access violation creating a QDomElement the second time

I wrote a class to handle an XML file. The class loads the file on construction and will save it on destruction. While the class is active I have several getter and setter functions to change the values. One of them is a function to log some file…
Darkproduct
  • 1,062
  • 13
  • 28
0
votes
1 answer

Checking for exception in XML

I have a XML file that looks like this: abc def And i've created code like this: QDomDocument…
Seba
  • 5
  • 3
0
votes
1 answer

QDomElement fails to detect right nodeType

I currenty struggeling to parse XML documents because QDomElement seems to have a problem to detect the correct nodeType. My xml document has th following content: Tove
Frogtime
  • 11
  • 2
0
votes
0 answers

Issue with QDomDocument::setContent and XML declaration attribute quotes

I'm having an issue when importing an XML document from a string. The XML declaration/preprocessor has two attributes (version, encoding) which are defined within double-quotes. However, on creating a QDomDocument via the setContent method, the…
evanol
  • 21
  • 2
0
votes
1 answer

How to retrieve the value of an attribute, inside a QDomNodeList?

I've got an xml file, and I am working on this QDomNodeList :
Tofuw
  • 908
  • 5
  • 16
  • 35
0
votes
1 answer

Searching for XML attributes with special parent in with Qt

How can I manage that my XML reader, searching for attributes with a special parent element? e.g. my XML file:
1
user3676560
  • 151
  • 2
  • 15
0
votes
1 answer

no matching function for call to 'QDomDocument::createElement()'

I'm currently trying to put the values of some QLineEdits into a XML document. I use QDom for this. Here's my code: void MainWindow::writeSysConf(const QString &arg1){ QFileDialog fdExport; QString filename = fdExport.getSaveFileName( …
KrauseDroid
  • 63
  • 2
  • 9
-1
votes
0 answers

PHP DOMDocument : DON't get Value

I am scrap input field value from a portal form ! but I have scraped the data from Dom document or Preg -match-all so that I can echo its value and there it has blackened my page and under certain conditions my code is correct.