How to read XML values

I am able to read an xml file using CCFileUtils in cocos2d-x and my sample output is:

1 easy

2
easy

3
medium

My question is, How can I get the value of the stage tag or the difficulty tag?
I don’t have a lot of experience handling xml files. :frowning:

Any help is greatly appreciated. :slight_smile:

Thanks!

use ccdictionary

CCDictionary* dict = CCDictionary::createWithContentsOfFile(“localization.xml”);

CCLOG (dict->valueForKey(“Prova”)->getCString());

<?xml version="1.0" encoding="UTF-8"?> Prova Catalunya is not spain

Thanks but I already found out how. Will post my answer soon, I’m just a little busy.

Thanks anyway! :slight_smile:

joven noname wrote:

Thanks but I already found out how. Will post my answer soon, I’m just a little busy.

Great. I’m very interest to see your solution here.

Hi Jovenrp,

You havent posted the solution till now… Are you still that busy?