Hi Yifeng Wu,
yes, you can use XML files in your project to save game data. You can use pugixml library with cocos2d-x to work with XML files.
If you have an XML and you only need to read this file you only need to copy into Resource folder and include a reference into your project.
If you game are going to generate XML files to store game data, you will need to safe into a specific device folder. If you are building a multiplatform game remember that each device has its own internal folder structure to store files, so when you generate the XML you need to distinguish between devices and safe internally in the correct folder.
In Android devices every installed app has a folder under /data/data folder so if you want to safe the file example.xml you need to safe into the path /data/data/ + start activity package name + file/
In Windows there are not problem, you can safe anywhere if you have the appropriate folder permissions.
In iOS devices each app have its own folder structure, you need to safe inside Documents folder into app folder structure.
I hope you find it useful….!