Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

XML - Creating a complex XML (Google Earth) structure

$
0
0
OK, I know that this has got to be simple but I have been working on it for several days and just haven't been able to figure it out. I've even gone through the XML sections of the Pentaho Data Integration 4 Cookbook book and Pentaho Kettle Solutions book but it still isn't clicking.

I'm trying to create a Google Earth kml file (i.e., XML file) from a CSV text file. The XML structure I'm trying to create is shown on the Google Earth KML Tutorial page:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Placemark>
<name>Simple placemark</name>
<description>Attached to the ground. Intelligently places itself at the height of the underlying terrain.</description>
<Point>
<coordinates>-122.0822035425683,37.42228990140251,0</coordinates>
</Point>
</Placemark>
</kml>

Am I correct in that I cannot use the XML Output step since the above isn't a "simple" output? I tried that at first and I couldn't handle the Point & coordinate XML fragments.

I've tried multiple other ways to generate the XML format that is needed but I just can't figure out how to produce the <Point><coordinates></coordinates></Point> section.

The input data would be coming from a CSV file with a single row/record containing the data for each <Placemark></Placemark> fragment.

Any help would be appreciated!

Thanks.

Viewing all articles
Browse latest Browse all 16689

Trending Articles