Results 1 to 3 of 3

Thread: problem creating dom tree

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Posts
    140
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 4 Times in 3 Posts

    Default Re: problem creating dom tree

    Is this code even compiling? You're missing a closing bracket:
    ele.appendChild(doc->createTextNode("some text");
    If that's not the problem, then what's the result of your code?

  2. #2
    Join Date
    Feb 2008
    Posts
    102
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    3

    Thumbs up Re: problem creating dom tree

    I resolve the problem, clearing my dom tree with the reallocation of a new QDomDocument instead of calling the function clear():

    Qt Code:
    1. doc=new QDomDocument("doc");
    2. root=doc->createElement("root");//root file
    3. doc->appendChild(root);
    To copy to clipboard, switch view to plain text mode 

    And than, i use
    Qt Code:
    1. doc->elementsByTagName("node1");
    To copy to clipboard, switch view to plain text mode 

    instead of :
    Qt Code:
    1. root.elementsByTagName("node1");
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. creating a Tree
    By mickey in forum General Programming
    Replies: 0
    Last Post: 20th April 2008, 17:57
  2. creating a tree hierarchy using QStandardModel
    By wind in forum Qt Programming
    Replies: 3
    Last Post: 19th September 2006, 21:54
  3. creating dll problem -> no exports ...
    By vrudolf in forum Qt Programming
    Replies: 2
    Last Post: 30th July 2006, 16:47
  4. problem with tree view
    By boss_bhat in forum Newbie
    Replies: 4
    Last Post: 4th June 2006, 21:03
  5. Problem in creating thread in GUI application
    By jyoti kumar in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2006, 12:05

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.