trying to write to and read a xml file on my C drive using java

T

tosenr

I was trying to write an object into a xml file more like a database. I
have this class called write to file. I am reading my var from a swing
gui I created. Need help

public String writeToFile(String Name, String Address String phone)
{
name = Name;
address = Address;
phone =Phone ;

}
You kind of get the idea. What I want to do is this to writer a xml
file that on my c drive. I tried a few things but it still not working.
Now what I am doing is using buffer reader to write to and read form a
txt file assign the tags "</>" while I passing in the string
individually and force it to save as xml. I know this sucks that is why
I need some help. I have tried appending new childNode on to parentNode
it did not work for me. I think I have the code wrong.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top