> For the complete documentation index, see [llms.txt](https://developers.weglot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.weglot.com/cms/wordpress/helpers-functions-1/weglot_xml_treat_page.md).

# weglot\_xml\_treat\_page

This filter allow you to modifiy the translated content when this one is xml.

The filter receives the translated XML response (a string, for example a sitemap) and must return it. `weglot_html_treat_page` has already run on it.

```php
add_filter( 'weglot_xml_treat_page', 'custom_weglot_xml_treat_page' );
function custom_weglot_xml_treat_page( $xml ) {
    // Edit the translated XML here.
    return $xml;
}
```
