Results 1 to 2 of 2

Thread: QDomDocument and xml version/encoding definitions

  1. #1
    Join Date
    Jan 2008
    Location
    Brasil
    Posts
    131
    Thanks
    18
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QDomDocument and xml version/encoding definitions

    Hi,

    Is there any method of class QDomDocument to generate the "head" of the xml file? This "head" referring to is this:

    Qt Code:
    1. <?xml version="1.0" encoding="UTF-8"?>
    To copy to clipboard, switch view to plain text mode 

    Thanks,

    Marcelo E. Geyer

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 162 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QDomDocument and xml version/encoding definitions

    QDomDocument::createProcessingInstruction()
    e.g.
    Qt Code:
    1. createProcessingInstruction("xml", "version=\"1.0\" encoding=\"utf-8\"");
    To copy to clipboard, switch view to plain text mode 

  3. The following 2 users say thank you to caduel for this useful post:

    crsn (28th March 2011), estanisgeyer (18th September 2008)

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.