Results 1 to 9 of 9

Thread: Readable Xml with QXmlStreamWriter

  1. #1
    Join Date
    Apr 2009
    Location
    Valencia (Spain)
    Posts
    245
    Thanks
    38
    Thanked 19 Times in 19 Posts
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Readable Xml with QXmlStreamWriter

    Hi,

    I am using QXmlStreamWriter to write a xml file, but when I open it the lines are displayed one after the other horizontally.

    There is any way to do it more readable, for example, any way to add "/n" or instruction or something like that to implement a carry return?

    thanks!

  2. #2
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Readable Xml with QXmlStreamWriter

    Try to open it in web browser

  3. #3
    Join Date
    Apr 2009
    Location
    Valencia (Spain)
    Posts
    245
    Thanks
    38
    Thanked 19 Times in 19 Posts
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: Readable Xml with QXmlStreamWriter

    thanks!, but, eventually I will need to edit it manually, that's why I want to use a xml file, but it's a mess.

  4. #4
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Readable Xml with QXmlStreamWriter

    Better to use a XML editor.

  5. #5
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Readable Xml with QXmlStreamWriter

    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  6. The following user says thank you to spirit for this useful post:

    jano_alex_es (26th August 2009)

  7. #6
    Join Date
    Apr 2009
    Location
    Valencia (Spain)
    Posts
    245
    Thanks
    38
    Thanked 19 Times in 19 Posts
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: Readable Xml with QXmlStreamWriter

    sure! But it could be edited for people who, about computers, only knows MS Office :P

    Anyway, if there is no way to do it, I can just create a big string and write it in a file. But I prefer to use qt objects, if possible.

  8. #7
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Readable Xml with QXmlStreamWriter

    Quote Originally Posted by spirit View Post
    This is cool.

  9. #8
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Readable Xml with QXmlStreamWriter

    Quote Originally Posted by jano_alex_es View Post
    sure! But it could be edited for people who, about computers, only knows MS Office :P
    Why they need to do that.
    Anyway if you write a proper formatted XML, then it will be more readable and editable.

  10. The following user says thank you to yogeshgokul for this useful post:

    jano_alex_es (26th August 2009)

  11. #9
    Join Date
    Apr 2009
    Location
    Valencia (Spain)
    Posts
    245
    Thanks
    38
    Thanked 19 Times in 19 Posts
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: Readable Xml with QXmlStreamWriter

    Quote Originally Posted by spirit View Post
    thanks! thats exactly what I was looking for ^^

Similar Threads

  1. Replies: 2
    Last Post: 26th August 2009, 10:18
  2. Adding elements with QXmlStreamWriter
    By hazardpeter in forum Newbie
    Replies: 4
    Last Post: 22nd August 2009, 12:45
  3. Use QXmlStreamWriter to modify existing elements
    By rhf417 in forum Qt Programming
    Replies: 8
    Last Post: 25th June 2009, 02:23
  4. QXmlStreamWriter and attribute namespaces
    By TomasC in forum Qt Programming
    Replies: 0
    Last Post: 11th December 2008, 06:11
  5. QXmlStreamWriter import node childs?
    By patrik08 in forum Qt Programming
    Replies: 2
    Last Post: 6th September 2008, 12:27

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.