Skip to content
  • 0 Votes
    3 Posts
    1k Views
    R

    Hi JonB, thanks for your quick response.

    In effect, I just want to get the values of (And that's how I do it):

    <applicationdisplayname> My Application Display Name </applicationdisplayname> <applicationhashkey> a9cd0d49e19637c0fea893d12ac87f64 </applicationhashkey> <applicationname> MyApplicationName </applicationname> . . .

    I already detected the problem that was presented to me, when I traversed the XML tree, each node converted it directly to QDomElement and that was where the error was located. Well, when comparing with

    element.nodeValue () .isEmpty ()

    The value thrown is the one mentioned in the first post, then I switched to QDomNode and when doing the same comparison I threw empty and additional to that allows me to go deeper into the tree and ask if it is a QDomText and better control my requirements.

    In short, the solution is to obtain the QDomDocument, go through each node of the XML tree as QDomNode and compare it with

    element.nodeValue () .isEmpty ()

    what you have told me happens

    @JonB said in how to determine an empty node with QDomNode:

    Are you thinking of:
    <app>
    some-arbitrary-text-here
    <applicationdisplayname>My Application Display Name</applicationdisplayname>

    That (some-arbitrary-text-here) is not going to happen. A node will either be a text node, containing text, or it will be an element which instead contains other child nodes. If by any chance that is what you are asking about.

    Thank you very much for your help and guidance.