original_string: public static function clearXml($xml = '', $remEnc = false)
      {
          //$xml = self::clearMsg($xml);
          $aFind = [
              'xmlns:default="http://www.w3.org/2000/09/xmldsig#"',
              ' standalone="no"',
              'default:',
              ':default',
              "\n",
              "\r",
              "\t",
          ];
          if ($remEnc) {
              $aFind[] = '<?xml version="1.0"?>';
              $aFind[] = '<?xml version="1.0" encoding="utf-8"?>';
              $aFind[] = '<?xml version="1.0" encoding="UTF-8"?>';
              $aFind[] = '<?xml version="1.0" encoding="utf-8" standalone="no"?>';
              $aFind[] = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
          }
          $retXml = str_replace($aFind, '', $xml);
  
          return $retXml;
      }
code: public static function clearXml($xml = '', $remEnc = false)
      {
          //$xml = self::clearMsg($xml);
          $aFind = [
              'xmlns:default="http://www.w3.org/2000/09/xmldsig#"',
              ' standalone="no"',
              'default:',
              ':default',
              "\n",
              "\r",
              "\t",
          ];
          if ($remEnc) {
              $aFind[] = '<?xml version="1.0"?>';
              $aFind[] = '<?xml version="1.0" encoding="utf-8"?>';
              $aFind[] = '<?xml version="1.0" encoding="UTF-8"?>';
              $aFind[] = '<?xml version="1.0" encoding="utf-8" standalone="no"?>';
              $aFind[] = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
          }
          $retXml = str_replace($aFind, '', $xml);
  
          return $retXml;
      }
code_tokens: public static function clearXml ( $ xml = '' , $ remEnc = false ) { //$xml = self::clearMsg($xml); $ aFind = [ 'xmlns:default="http://www.w3.org/2000/09/xmldsig#"' , ' standalone="no"' , 'default:' , ':default' , "\n" , "\r" , "\t" , ] ; if ( $ remEnc ) { $ aFind [ ] = '<?xml version="1.0"?>' ; $ aFind [ ] = '<?xml version="1.0" encoding="utf-8"?>' ; $ aFind [ ] = '<?xml version="1.0" encoding="UTF-8"?>' ; $ aFind [ ] = '<?xml version="1.0" encoding="utf-8" standalone="no"?>' ; $ aFind [ ] = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' ; } $ retXml = str_replace ( $ aFind , '' , $ xml ) ; return $ retXml ; }
docstring: clearXml
  Remove \r \n \s \t.
  @param string $xml
  @param bool $remEnc remover encoding do xml
  @return string
docstring_tokens: clearXml Remove \ r \ n \ s \ t .