As per my comment, I've tried your code and it ran with no problems (on a stand-alone java app). So, my thoughts on what was happening would be:
- Any compilation or classpath issue, which would probably be corrected on project cleanup
- If you are debugging it on a physical phone, something may have happened on which it didn't let the program write on that file
- Your app may had any problem with permissions on writing that file
Anyways, here's the generated file:
<example>
<property string="testing1" value="a"/>
<property string="testing2" value="b"/>
<property string="testing3" value="c"/>
</example>