My application maintains a struct like this (with more nesting)

Qt Code:
  1. typedef struct
  2. {
  3. double length;
  4. double space;
  5. double tOffset;
  6. double sOffset;
  7. QString rule;
  8. }ODLD;
  9.  
  10. typedef struct
  11. {
  12. QString name;
  13. double width;
  14. ODLD odLD;
  15. }ODRMT;
  16.  
  17. typedef struct
  18. {
  19. double sOffset;
  20. QString type;
  21. QString weight;
  22. QString color;
  23. double width;
  24. QString change;
  25. QList<ODRMT*> odRMT;
  26. }ODRMR;
To copy to clipboard, switch view to plain text mode 

Now I want to write this data into an XML file. Goolge-ing for this did not help me much with samples/examples. On the lookout for a sample code from where I can start of and go on to build the complete xml file.