Results 1 to 3 of 3

Thread: QDomDocument - closed nodes?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Warsaw, Poland
    Posts
    45
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    1

    Default QDomDocument - closed nodes?

    Is there any possibility to check if all nodes in document are closed? I mean... if node <node> has child nodes then somwhere will be </node> or if node is empty it will only be a <node/>. Any hint will be usefull

  2. #2
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanked 42 Times in 37 Posts

    Default Re: QDomDocument - closed nodes?

    QDomNode::hasChildNodes ()
    Save yourself some pain. Learn C++ before learning Qt.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QDomDocument - closed nodes?

    DOM tree will not validate if it has unmatched tags, so if QDomDocument::setContent returns true, it means that all tags are matched.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.