I have searched several websites and all of them give different examples of how to write to a XML file. This is how the XML should look like after I write into it:
<?xml version= "1.0"?>
<Customers>
<Marker category="Production">
<title lang="en">Invensys</title>
<site_location>Neponset Avenue 22, Foxborough, Foxboro, MA, United States</site_location>
<latitude>42.066817</latitude>
<longitude>-71.24814</longitude>
<site_status>Normal</site_status>
</Marker>
<Marker category="Production">
<title lang="en">Yokogawa Japan</title>
<site_location>Shinjuku, Tokyo, Japan</site_location>
<latitude>36.543915</latitude>
<longitude>136.629281</longitude>
<site_status>Critical</site_status>
</Marker>
</Customers>
I know there are many API's for this so please help me with a basic writing method for a creation of a simpler XML file and I will continue from there.
Thanks in advance.
Java certainly has APIs for writing XML. Start with a Document:
and so on.
A nice little tutorial can be found here
This is just one way of many, but it's probably the best one to get started with.