---
title: "xml2str | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Function xml2str

-   xml2str(node: [Node](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Node/)): string[](#xml2str)
    
    create a function that converts a XML to a string [https://developer.mozilla.org/en-US/docs/Web/API/XMLSerializer](https://developer.mozilla.org/en-US/docs/Web/API/XMLSerializer)
    
    #### Parameters
    
    -   node: [Node](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Node/)
    
    #### Returns string
