我搜索了几个网站,它们都给出了如何写入 XML 文件的不同示例。这是我写入 XML 后的样子:
<?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>
我知道这有很多 API,所以请帮助我创建一个更简单的 XML 文件的基本编写方法,我将从那里继续。
提前致谢。