16-Step tab for special characters: https://websitebuilders.com/tools/html-codes/ascii/
Can be converted by the Hexdec () and chr () methods,
Example:
<? XML version=\x221.0\x22 encoding=\x22utf-8\x22 ?>\x0a<IDaffiliate event_id refalias
Where \x22 is the double quote ", and \x0a is the change number \ n, through some methods after conversion:
$str= "<?xml version=\x221.0\x22 encoding=\x22utf-8\x22?>\x0a<order id=\x22test\x22 affiliate=\x22main\x22 event_id=\x221\x22 ref=\x22tpcya\x22 alias=\x22\x22/> "; functionHexdec_string ($content) { Preg_replace_callback( "(\\\\x ([0-9a-f]{2})) I",function($matches) {return CHR(Hexdec($matches[1]);},//$string $content ); return $content; } Echo Htmlspecialchars(Hexdec_string ($str), ent_quotes); Export the contents of XML as plain text
Results:
<? XML version= "1.0" encoding= "Utf-8" ?> < ID= "Test" affiliate= "main" event_id= "1" ref = "Tpcya" alias= ""/>
Reference: HTTPS://STACKOVERFLOW.COM/QUESTIONS/12238657/DECODING-JAVASCRIPT-ESCAPE-SEQUENCES-IN-PHP-X27-X22-ETC
http://php.net/manual/en/function.preg-replace-callback.php
PHP restore 16 Binary special characters