Return to Snippet

Revision: 42427
at March 4, 2011 23:42 by darkbaron1912


Initial Code
/**
         * 名前空間を削除します
         * @param    オリジナルストリング(XML形式)
         * @return    namespace宣言を取り去ったXML
         */
        private function deleteNameSpace(xmlText : String) : XML {
            // remove the namespaces from the string representation of the XML
            xmlText = xmlText.replace(new RegExp("xmlns[^\"]*\"[^\"]*\"", "gi"), "");
            xmlText = xmlText.replace(new RegExp("xsi[^\"]*\"[^\"]*\"", "gi"), "");

            // set the string rep. of the XML back to real XML
            return new XML(xmlText);
        }

Initial URL


Initial Description


Initial Title
deleteNameSpace XML

Initial Tags
xml

Initial Language
ActionScript 3