Search code examples
c++qmlblackberry-10cascade

How to create XML file in blackberry 10 device document directory through cascade QML?


I have XML data stored in QString/QByteArray, I want to write that xml data in new sample.xml file and save that file in device document directory.

Anyone please guide me on this.

Thanks in advance.


Solution

  • You can use QXmlStreamWriter. Here you can find an official example which reads from a device and then writes that out. You could slightly modify this to allow to read from your QString/QByteArray by the appropriate construct if I understand your query correctly.