Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    [SOLVED] Writing XML with QDom

    General and Desktop
    1
    1
    496
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Paawan last edited by

      Hi All,

      I am able to write <Chapter Number =" 1"/>
      using the below code:

      @
      for (int x =0; x<10; x++)
      {
      QDomElement Chapter = doc.createElement("Chapter");
      Chapter.setAttribute( " Number ", " " + QString::number(x));
      Book.appendChild(Chapter);
      }

      @

      but how do I write " <Chapter> Number 1 </Chapter> "

      Thanks All

      1 Reply Last reply Reply Quote 0
      • First post
        Last post