# Parse KML string as geometry list > Supported in: Batch, Streaming Parses KML string as a list of GeoJSONs, ignoring all KML attributes. **Expression categories:** Geospatial ## Declared arguments * **KML string to parse:** Valid KML string to parse to geometry.
*Expression\* * *optional* **Output mode:** Choose whether to output null on an erroneous output, or a result type from which you can extract the 'ok' field to get the geometry list or the 'error' field to get a descriptive error message. This will also apply to all of the geometries inside the list.
*Enum\* * *optional* **Prepare geometry after parse:** Choose whether the KML should be prepared to adhere to Foundry geometry semantics. It is recommended to prepare in most cases to prevent failure during ontology indexing. Preparing will null out invalid geometries, for example those with out of bounds coordinates.
*Literal\* **Output type:** *Array\ | Struct\>, error:String>* ## Examples ### Example 1: Base case **Argument values:** * **KML string to parse:** `col` * **Output mode:** `simple` * **Prepare geometry after parse:** true | col | **Output** | | ----- | ----- | | \
\
\
\
\
\
\ **error**: *null*,
 **ok**: \[ {
 **error**: *null*,
 **ok**: {"ty... | *** ### Example 4: Base case **Argument values:** * **KML string to parse:** `col` * **Output mode:** `with_errors` * **Prepare geometry after parse:** false | col | **Output** | | ----- | ----- | | \
\
\ **error**: *null*,
 **ok**: \[ {
 **error**: *null*,
 **ok**: {"ty... | *** ### Example 5: Base case **Argument values:** * **KML string to parse:** `col` * **Output mode:** `simple` * **Prepare geometry after parse:** false | col | **Output** | | ----- | ----- | | randomKmlFileString | *null* | *** ### Example 6: Base case **Argument values:** * **KML string to parse:** `col` * **Output mode:** `with_errors` * **Prepare geometry after parse:** false | col | **Output** | | ----- | ----- | | randomKmlFileString | {
 **error**: Failed to parse String. Error: Unexpected character 'r' (code 114) in prolog; expected '<'
at \[row,col {unknown-source}]: \[1,1],
 **ok**: *null*,
} | *** ### Example 7: Null case **Argument values:** * **KML string to parse:** `col` * **Output mode:** `simple` * **Prepare geometry after parse:** false | col | **Output** | | ----- | ----- | | *null* | *null* | *** ### Example 8: Null case **Argument values:** * **KML string to parse:** `col` * **Output mode:** `with_errors` * **Prepare geometry after parse:** false | col | **Output** | | ----- | ----- | | *null* | {
 **error**: Null input: KML,
 **ok**: *null*,
} | ***