Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[Solved]QDomElement specific childElement



  • Hello,
    I want to load some text of a xml document.
    I find some methods in the documentary to load the child elements.
    E.g. firstChildElement() and lastChildElement() , but is there any possibility to say a specific number?
    @
    QDomElement root = xmlDocument.firstChildElement();
    QDomElement nodeDeposit = root.firstChildElement(); // instead of firstChildElement something like "secondChildElement" or "thirdChild Element"
    @

    thanks


  • Lifetime Qt Champion

    Hi,

    Loop through QDomNode::childNodes() ?

    Hope it helps


Log in to reply