Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 15
Registered: ‎02-20-2014
My Device: Z10
Accepted Solution

how can i use xml config file in native c++/qml

i want to use an xml config file in my app.but i dont know which path should i put my xml file in,and how can i read it.how to get the file path...

Developer
Posts: 16,524
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: how can i use xml config file in native c++/qml

welcome to the support forums.

do you mean you want to install the app, then place an xml file somewhere and read that with the app?
you would use the shared directory for that, then.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 15
Registered: ‎02-20-2014
My Device: Z10

Re: how can i use xml config file in native c++/qml

ou, thanks...
so i can't put the xml file in some folder in my project.
is it right?
Developer
Posts: 15
Registered: ‎02-20-2014
My Device: Z10

Re: how can i use xml config file in native c++/qml

ou, thanks...
so i can't put the xml file in some folder in my project.
is it right?

Developer
Posts: 16,524
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: how can i use xml config file in native c++/qml

sure, you can put the xml into your project. but why would you want to do that?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 15
Registered: ‎02-20-2014
My Device: Z10

Re: how can i use xml config file in native c++/qml

because,i just want to use the xml inside my code.
if i put it in my project,how can can i get it.i mean how can i get the xml file's path.which folder i should put it in.
u know i am new here ,hehe.
Developer
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C

Re: how can i use xml config file in native c /qml

Hope this can help you

 

QXmlStreamReader for parsing XML files

 

http://doc.qt.nokia.com/4.7-snapshot/qxmlstreamreader.html

 

 

 

... and QXmlStreamWriter for writing

 

http://doc.qt.nokia.com/4.7-snapshot/qxmlstreamwriter.html

 

 

 

The Bookmarks reader will be a great example for you :

 

http://doc.qt.nokia.com/4.7-snapshot/xml-streambookmarks.html

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Developer
Posts: 15
Registered: ‎02-20-2014
My Device: Z10

Re: how can i use xml config file in native c /qml

thinks.
i have got a lot from doc.qt.nkia.com.
Developer
Posts: 6,146
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30

Re: how can i use xml config file in native c /qml

These are in the BlackBerry documentation as well under Core, for example...

 

http://developer.blackberry.com/native/reference/cascades/qxmlstreamreader.html


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 15
Registered: ‎02-20-2014
My Device: Z10

Re: how can i use xml config file in native c++/qml

yes,the BlackBerry documentation is powerful and helpful