Results 1 to 4 of 4

Thread: How to get multiple lines values in XML file..

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2008
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to get multiple lines values in XML file..

    how to get multi line of values out of xml??

    Sample xml:

    Qt Code:
    1. <xml name="xml"/>
    2. <xml1 name="xml1"/>
    3. <xml2 name="xml2"/>
    4. <xml3 name="xml3"/>
    To copy to clipboard, switch view to plain text mode 
    thanks in advanced..

    qt code:

    Qt Code:
    1. QDomElement roots = doc.documentElement();;
    2. if(!roots.isNull()){
    3. QString elementName = roots.tagName();
    4. if(elementName.compare("xml")==0){
    5. setxml(roots.attribute("name"));
    6. selectedxml->setText( getxml() );
    7. }
    8. }
    To copy to clipboard, switch view to plain text mode 
    how to modify this code to get values of xml, xml1, xml2, xml3's name from xml file..
    thanks..
    Last edited by jpn; 21st July 2008 at 12:25. Reason: missing [code] tags

Similar Threads

  1. read file from end to beginning..
    By soul_rebel in forum Qt Programming
    Replies: 11
    Last Post: 4th June 2012, 01:20
  2. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  3. reading from a file
    By mickey in forum General Programming
    Replies: 32
    Last Post: 19th July 2007, 01:04
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  5. Replies: 13
    Last Post: 21st June 2006, 21:22

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.