Converts from XML to GEOJson
✓ Published0🌍 Public
CCliffordAnderson
Last edited Jan 28, 2014
Created on Jan 28, 2014
This example shows the conversion of a single XML item containing place-name, latitude, and longitude data into a GeoJSON FeatureCollection with a Point geometry. It demonstrates a direct data-shape transformation. The code constructs the output JSON structure explicitly, mapping the XML text value to a `properties` field and the numeric coordinates into a `coordinates` array. The conversion relies on the MarkLogic `json:serialize` function to produce the final GeoJSON output from the hand-built `json` element. The snippet does not include any rendering or mapping library.
AI-generated description