src/Utils.php
public static function stripNamespacesFromXml($xml)
    {
        $xml = preg_replace('/<[a-zA-Z0-9]+:/','<',$xml);
        $xml = preg_replace('/<\/[a-zA-Z0-9]+:/','</',$xml);
        $xml = preg_replace('/ xmlns:[a-zA-Z0-9]+=".*">/','>',$xml);

        return $xml;
    }
public static function stripNamespacesFromXml($xml)
    {
        $xml = preg_replace('/<[a-zA-Z0-9]+:/','<',$xml);
        $xml = preg_replace('/<\/[a-zA-Z0-9]+:/','</',$xml);
        $xml = preg_replace('/ xmlns:[a-zA-Z0-9]+=".*">/','>',$xml);

        return $xml;
    }
public static function stripNamespacesFromXml ( $ xml ) { $ xml = preg_replace ( '/<[a-zA-Z0-9]+:/' , '<' , $ xml ) ; $ xml = preg_replace ( '/<\/[a-zA-Z0-9]+:/' , '</' , $ xml ) ; $ xml = preg_replace ( '/ xmlns:[a-zA-Z0-9]+=".*">/' , '>' , $ xml ) ; return $ xml ; }
Remove namespaces from XML
@param string $xml
@return string
Remove namespaces from XML