XML에서 CDATA를 사용하여 텍스트를 가져올 때 줄바꿈 및 기호를 원래대로 표현하기 위한 함수.

1
2
3
4
5
6
7
8
9
10
replaceText = function(str:String):String{
        str = str.split("\r\n").join("\r");
        str = str.split(""").join("\"");
        str = str.split("'").join("'");
        str = str.split("&lt;").join("<");
        str = str.split("&gt;").join(">");
        str = str.split("&amp;").join("&");
 
        return str;
}

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

   
© 2011 Hangun's World - Blog Suffusion theme by Sayontan Sinha