Results 1 to 2 of 2

Thread: problem writing an xml file

  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default problem writing an xml file

    Hi, I'm coding a like xml tree to write to a file. I'm using C# I'll hope you can help me.
    The Code:
    Qt Code:
    1. ..........................................
    2. myClass.Xml_doc.AppendChild(xml_root);
    3. XmlTextWriter xmlW = new XmlTextWriter("..\\..\\output.html", null);
    4. xmlW.Formatting = Formatting.Indented;
    5. myClass.Xml_doc.WriteContentTo(xmlW);
    6. xmlW.Close();
    To copy to clipboard, switch view to plain text mode 
    The problem is output.html: intead of '<' and '>' there are '&lt;' and '&gt;'.
    How Can I solve it, please?
    Thanks
    EDIT ---
    the problem is that in a method, I have a string like: <script .......> </script> and ohter tags. Then, in my xml_doc, I attach that string as part of innerTEXT of a tag; I hope you'l understand where the point is.
    Last edited by mickey; 21st January 2008 at 01:44.
    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem writing an xml file

    It looks like you are adding the tags as text, not as XML snippet.

Similar Threads

  1. EXE File problem
    By triperzz in forum Installation and Deployment
    Replies: 8
    Last Post: 18th January 2008, 19:00
  2. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  3. Writing to file at specific
    By safknw in forum Qt Programming
    Replies: 3
    Last Post: 1st December 2006, 11:12
  4. XML file writing
    By mbjerkne in forum Qt Programming
    Replies: 2
    Last Post: 24th May 2006, 19:04
  5. QProcess problem with windows batch file
    By bood in forum Qt Programming
    Replies: 11
    Last Post: 6th January 2006, 08:08

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.