Results 1 to 2 of 2

Thread: How to change QDomElement's text

  1. #1
    Join Date
    Aug 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question How to change QDomElement's text

    hi

    I have a problem to change the txt in an element:
    I want to change
    <tag1>a</tag1>
    to
    <tag1>b</tag1>
    Is there a simple way to do this?

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

    Default Re: How to change QDomElement's text

    Create a QDomText node and add it as a child of your element after removing the current text node from the element.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 0
    Last Post: 23rd February 2011, 16:36
  2. QDomElement text
    By emrares in forum Qt Programming
    Replies: 2
    Last Post: 21st December 2010, 08:44
  3. How to get Text value of a QDomElement ? (noob question)
    By BillGates in forum Qt Programming
    Replies: 6
    Last Post: 31st August 2010, 14:01
  4. Setting the text in QDomElement
    By dpatel in forum Qt Programming
    Replies: 1
    Last Post: 4th May 2010, 13:12
  5. QDomElement::text() returns corrupted strings
    By sladecek in forum Qt Programming
    Replies: 6
    Last Post: 7th March 2009, 14:07

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.