I have created internal storage xml file and added parent nodes to it by
String data="<?xml version='1.0'?>\n<parent>\n</parent>"; fos = openFileOutput(fileName + ".xml", Context.MODE_PRIVATE); fos.write(data.getBytes()); Now i want to add child nodes between parent nodes. After user has filled text field (example "Romeo") and pressed the button. New entry will be added after last one.
<?xml version='1.0'?> <parent> <child> <name>Jon</name> </child> <child> <name>Romeo</name> </child> </parent> I know how to do it in pure java but i have no idea how to do it in android.
No comments:
Post a Comment