Results 1 to 2 of 2

Thread: QT 4 Xml parsing with special characters

  1. #1
    Join Date
    Mar 2007
    Posts
    5
    Qt products
    Qt3
    Platforms
    Windows

    Default QT 4 Xml parsing with special characters

    Hi,
    I have to parse an xml file, which contains "%" as a text of a node.

    QDomelement.text() returns nothing.

    example:
    <TD>%</TD>

  2. #2
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT 4 Xml parsing with special characters

    Assuming that "e" is the element whose tagName() is "TD", here is the code you'll need to extract your "%" :
    text = e.firstChild().toText().data();
    Current Qt projects : QCodeEdit, RotiDeCode

Similar Threads

  1. Problem at time compilation in traslation of language
    By thomasjoy in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2007, 14:18
  2. Using special characters in QT dialogs
    By hvengel in forum Qt Tools
    Replies: 2
    Last Post: 10th April 2007, 00:32

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.