<?php
$input = <<<MyXML
<?xml version="1.0"?>
<root><succes>true</succes><message>Succes request</message><data>251;252;253</data></root>
MyXML;

$tidy_config = [
    'output-xml' => true, 
    'input-xml' => true,
    'indent' => true,
    'clean' => true,
];

echo tidy_repair_string($input, $tidy_config);
