Header Ads

  • Cara Membuat Kode Konverter Parser HTML Ke XML Blogger



    Alat Parse Kode HTML Blogger Premium Responsif siap pakai silahkan gunakan codeflare webtools dibawah ini yang bekerja secara otomatis untuk merubah (meng-konversi) kode HTML atau Script baik untuk pemasangan widget atau untuk pemasangan kode iklan agar bisa disimpan oleh template blogger anda. Alat parse ini banyak digunakan untuk mengubah script iklan atau kode iklan seperti iklan adsense, adsensecamp, adnow atau iklan lainnya agar kode tersebut bisa ditaruh di dalam kode template blog dan tidak menyebabkan pesan error (kesalahan) pada saat mau di simpan (Save).

    Automatic Parser Code Tool
    Allow Double Encoding Insert <BR> (Break Line Code)

    Automatic Parser Code Tool dari codeflare sangat akurat dan sistematis sehingga mampu merubah simbol tag HTML dan Script secara keseluruhan tanpa merubah keseluruhan struktur kode HTML atau Script. Alat parser sangat mudah, cepat dan akurat untuk digunakan tinggal masukan kode sumber pada kotak source kemudian tekan tombol PARSE maka secara otomatis akan merubah (meng-konversi) kode-kode atau karakter tertentu agar bisa langsung dapat digunakan di template blog (mode edit kode HTML) tanpa menyebabkan error (kesalahan) pada saat di simpan (Save) atau bisa juga digunakan sebagai penulisan artikel untuk keperluan tutorial. Penjelasan singkat mengenai cara penggunaan Automatic Parser Code Tool adalah sebagai berikut.
    1. Source Code Box
      Kotak input kode sumber merupakan area teks untuk meletakan kode - kode sumber baik kode HTML maupun Script yang akan di parser atau di konversi.
    2. Pilihan "Allow Double Encoding"
      Merupakan pilihan (opsional) untuk melakukan proses konversi lebih lanjut terhadap kode simbol dalam hexadesimal. Baik tercentang atau tidak alat ini akan tetap mengkonversi tanpa menyebabkan error (kesalahan) dalam penggunaan di template blog maupun untuk keperluan ditampilkan dalam artikel (keperluan tutorial).
    3. Code Result Box
      Kotak output (hasil) merupakan kotak untuk menampilkan kode input (source code) yang sudah berhasil di parser (di konversi). Buat penggunaan tinggal pilih semua (select all) kemudian klik kanan pilih copy atau tekan tombol kombinasi [Ctrl+C] pada keyboard untuk melakukan proses salin (copy).
    4. Tombol "PARSE"
      Tombol untuk melakukan proses parsing (konversi) kode sumber (source code).
    5. Tombol "UNPARSE"
      Tombol untuk melakukan proses parsing (konversi) kebalikan pada kode sumber (source code). Jadi apabila ingin mengembalikan atau melihat kode awal yang sudah di parse caranya cukup mudah, tinggal memasukan kode yang sudah di parse ke ko kotak pertama (kotak input source code) kemudian tekan tombol UNPARSE untuk mendapatkan hasilnya pada kotak kedua (kotak output).
    6. Tombol "Clear Form"
      Tombol ini berfungsi untuk membersihkan kotak-kotak ke tampilan semula. Jadi tidak perlu repot lagi untuk melakukan konversi selanjutnya tinggal tekan tombol ini maka kotak input dan kotak output akan menjadi bersih (kosong) dari teks kemudian silakan lakukan proses konversi lainnya dengan cepat dan mudah.

    Apa Definisi Parse Kode HTML atau Script ?
    Parse HTML Dalam Konteks Blogger - adalah cara menguraikan (konversi) kode HTML atau Script yang masih Aktif menjadi karakter atau simbol entitas HTML atau Script menjadi Kode Pasif. Hal tersebut dilakukan supaya dapat terbaca dalam format XML atau post processing HTML (hanya terbaca tapi tidak diproses sementara sebagai kode program HTML). Parse HTML hanya merubah beberapa simbol kode umum HTML yang di konversi menjadi plain kode HTML (kode pasif).

    Kenapa Harus Di Parse ?
    Kode HTML Template (Tema) blogger menggunakan format XML, jadi agar tidak terjadi kesalahan penulisan kode HTML yang ingin dimasukan di dalam kode HTML template blog maka sebagian kode HTML atau Script tersebut harus dirubah (diparsing) dahulu. Sebenarnya saat anda merubah (memparse) baik kode HTML biasa atau Script, tidak serta merta semua kode berubah (dikonversi). Hanya beberapa simbol penulisan kode saja yang berubah, jika hanya kata atau kalimat yang dibungkus di dalam simbol kode HTML atau Script tersebut maka penulisan kata tersebut tidak harus berubah.

    Berikut beberapa contoh kode HTML yang berubah jika dikonversi menggunakan alat parse HTML.
    • tanda < menjadi &lt;
    • tanda > menjadi &gt;
    • tanda " menjadi &quot;
    • tanda ' menjadi &#039;
    • tanda & menjadi &amp;
    Konsep Automatic Parser Code Tool
    Konsep utama menggunakan Automatic Parser Code Tool sebagai alat bantu untuk mengkonversi atau merubah kode adalah untuk mempercepat, mempermudah dan menghindari kesalahan penulisan ulang kode sumber yang ingin di parser. Merubah kode sumber untuk di parser sebenarnya hanya merubah beberapa simbol dalam kode tersebut agar pada saat digunakan kode tersebut hanya berfungsi sebagai kode plain (kode yang terlihat namun tidak di eksekusi sementara). Contoh merubah kode aktif menjadi kode plain sebagai berikut.

    Kode Aktif
    <script>
    alert("Hello World");
    </script>

    Kode Pasif
    &lt;script&gt;
    alert(&quot;Hello World&quot;);
    &lt;/script&gt;

    Seperti yang terlihat pada contoh diatas kode script aktif setelah di konversi akan menjadi kode pasif, perubahan yang terjadi hanya merubah simbol tag (pembungkus kode) JavaScript dan syntax penunjuk string [" = &quot;] atau [' = &#039;] tanpa merubah struktur kode utama.

    Apabila akan digunakan di kode template blog maka secara otomatis kode aktif harus dirubah menjadi kode pasif agar tidak terjadi error (kesalahan) pada saat kode tersebut disimpan (Save). Kode pasif tersebut apabila akan di eksekusi maka server blogger akan secara otomatis merubahnya kembali menjadi kode aktif apabila di ekseskusi di browser (ditampilkan ke visitor).

    Merubah kode aktif menjadi kode pasif (hasil parser) juga berguna pada saat membuat tulisan artikel tutorial yang memerlukan penulisan kode sebagai bentuk teks. Apabila penulisan kode dalam bentuk teks menggunakan kode aktif maka kode tersebut akan di eksekusi (dijalankan) bukan ditampilkan sebagai teks biasa, untuk itu kode aktif tersebut butuh di parsing sehingga bisa ditampilkan sebagai teks biasa.

    Penggunaan pada bentuk kode yang sederhana mungkin masih bisa dilakukan secara manual atau menggunakan bantuan aplikasi teks dasar seperti NotePad dengan menggunakan bantuan pengganti (replace) huruf atau kata, tinggal tekan tombol [Ctrl + H] maka akan muncul kotak penggantian kata (replacement). Anda bisa mengganti secara satu-persatu, misalkan untuk karakter [ < ] dengan karakter plain HTML &lt; kemudian tekan tombol Replace All, kemudian untuk karakter berikutnya sama seperti langkah awal. Memang agak lama apabila menggunakan cara manual sehingga dibutuhkan suatu alat bantu (algoritma script) sederhana namun ampuh untuk mempercepat proses parsing kode dan juga mudah untuk digunakan.

    Automatic Parser Code Tool merupakan alat bantu sederhana yang sering digunakan para blogger dan developer web. Penggunaan alat bantu web ini sangat bermanfaat dan cukup luas penggunaannya. Buat para blogger yang sering membuat tutorial artikel coding mungkin alat bantu Automatic Parser Code Tool dari codeflare bisa digunakan untuk memudahkan parsing kode aktif menjadi kode pasif. Silakan di Bookmark halaman artikel ini agar tidak lupa apabila ingin menggunakan kembali Automatic Parser Code Tool dari CodeFlare.

    Press Ctrl+D to bookmark this page

    Cara Memasang Automatic Parser Code Tool
    Penggunaan alat bantu web Automatic Parser Code Tool sangat bermanfaat dan cukup luas penggunaannya. Beberapa blogger maupun developer terkadang memasang bahkan membuat sendiri alat parser kode ini. Pembuatan sendiri biasanya untuk menyesuaikan kebutuhan dari pengembangan terhadap situs itu sendiri. Namun untuk membuat sendiri dari nol alat parser kode ini membutuhkan waktu dan skill yang cukup mengenai algoritma script. Apabila penggunaan parsing kode hanya untuk sekedar parsing kode biasa sampai complex tanpa membutuhkan algoritma khusus saya rasa Automatic Parser Code Tool dari CodeFlare sudah lebih dari cukup.


    Memiliki Automatic Parser Code Tool di situsnya selain untuk kebutuhan pribadi, bisa menambah daya tarik untuk mendatangkan pengunjung organik ke situsnya. Selain bermanfaat alat ini sering dibutuhkan di kalangan blogger. Buat rekan blogger atau developer yang butuh Automatic Parser Code Tool dari CodeFlare untuk di pasang di situsnya, silakan digunakan, karena pada artikel ini saya berikan juga tutorial cara pemasangan Automatic Parser Code Tool dari CodeFlare.
    1. Login ke Blogger.
    2. Pilih menu "Halaman" atau "Pages".
    3. Buat Halaman baru dengan mengklik tombol "New Page" di bagian atas.
    4. Terdapat dua pilihan mode yaitu Compose dan HTML, jika ingin menuliskan paragraf pembuka silahkan pilih mode Compose terlebih dahulu, setelah itu pilih mode HTML untuk menaruh kode.

      <style>
      .background_encoder{
      padding:5px;
      border:1px solid #ccc;
      border-radius:8px;
      background:rgb(252,255,244);
      background:-moz-linear-gradient(top, rgba(252,255,244,1) 0%, rgba(223,229,215,1) 40%, rgba(179,190,173,1) 100%);
      background:-webkit-linear-gradient(top, rgba(252,255,244,1) 0%,rgba(223,229,215,1) 40%,rgba(179,190,173,1) 100%);
      background:linear-gradient(to bottom, rgba(252,255,244,1) 0%,rgba(223,229,215,1) 40%,rgba(179,190,173,1) 100%);
      filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfff4', endColorstr='#b3bead',GradientType=0 );
      }
      .txtcode{
      font:15px 'Courier New',Monospace; border:1px solid #CCCCCC;
      width:100%;
      height:250px;
      box-sizing:border-box;
      margin:0 auto;
      display:block;
      background:#fff;
      color:#333;
      padding:15px;
      }
      .inputBtnParse,.inputBtnUnParse,.inputBtnClear{
      border:2px solid #fff;
      padding:5px 12px;
      color:#fff;
      cursor:pointer;
      font-size:16px;
      margin:5px;
      line-height:23px;
      border-radius:4px;
      transition:all 0.3s ease-in-out;
      }
      .inputBtnParse{background:#0083da;}
      .inputBtnUnParse{background:#9f1f89;}
      .inputBtnClear{background:#1f9f2f;}
      .inputBtnParse:hover,.inputBtnUnParse:hover,.inputBtnClear:hover{background:#ffcc00;border-radius: 0px;}
      .inputBtnCopy{background:#2e4397;border:1px solid #ccc;padding:5px 10px;border-radius:5px;color:#fff;}
      </style>

      <div class="background_encoder"> <div style="color: red;text-align: center;font-size: large;font-weight:400;">Automatic Parser Code Tool</div> <div style="margin: 5px 0;"><button class="inputBtnCopy" onclick="copyFormCode()"><i class="fa fa-clipboard" aria-hidden="true"></i> Copy to Clipboard</button></div> <form id="frmEncoder" name="frmEncoder"> <textarea id="txtInput" name="txtInput" class="txtcode" placeholder="Input source code here..."></textarea> <div style="text-align: center;padding:2px;border:1px solid #fff;"> <input checked="checked" id="chkDouble" name="chkDouble" type="checkbox"/>Allow Double Encoding <input checked="checked" id="chkBr" name="chkBr" type="checkbox"/>Insert &lt;BR&gt; (Break Line Code)</div> <div style="text-align: center;"> <input id="cmdEncode" name="cmdEncode" class="inputBtnParse" onclick="HTMLEncode();" type="button" value="PARSE" /> <input id="cmdDecode" name="cmdDecode" class="inputBtnUnParse" onclick="HTMLDecode();" type="button" value="UNPARSE" /> <input id="cmdClear" name="cmdClear" class="inputBtnClear" onclick="doClrInput()" type="button" value="Clear Form" /> </div> </form> </div>

      <script type="text/javascript">
      Encoder={EncodeType:"entity",isEmpty:function(val){if(val){return((val===null)||val.length==0||/^\s+$/.test(val));}else{return true;}},
      arr1: ['&nbsp;', '&iexcl;', '&cent;', '&pound;', '&curren;', '&yen;', '&brvbar;', '&sect;', '&uml;', '&copy;', '&ordf;', '&laquo;', '&not;', '&shy;', '&reg;',
      '&macr;', '&deg;', '&plusmn;', '&sup2;', '&sup3;', '&acute;', '&micro;', '&para;', '&middot;', '&cedil;', '&sup1;', '&ordm;', '&raquo;', '&frac14;', '&frac12;',
      '&frac34;', '&iquest;', '&Agrave;', '&Aacute;', '&Acirc;', '&Atilde;', '&Auml;', '&Aring;', '&AElig;', '&Ccedil;', '&Egrave;', '&Eacute;', '&Ecirc;', '&Euml;',
      '&Igrave;', '&Iacute;', '&Icirc;', '&Iuml;', '&ETH;', '&Ntilde;', '&Ograve;', '&Oacute;', '&Ocirc;', '&Otilde;', '&Ouml;', '&times;', '&Oslash;', '&Ugrave;',
      '&Uacute;', '&Ucirc;', '&Uuml;', '&Yacute;', '&THORN;', '&szlig;', '&agrave;', '&aacute;', '&acirc;', '&atilde;', '&auml;', '&aring;', '&aelig;', '&ccedil;',
      '&egrave;', '&eacute;', '&ecirc;', '&euml;', '&igrave;', '&iacute;', '&icirc;', '&iuml;', '&eth;', '&ntilde;', '&ograve;', '&oacute;', '&ocirc;', '&otilde;',
      '&ouml;', '&divide;', '&oslash;', '&ugrave;', '&uacute;', '&ucirc;', '&uuml;', '&yacute;', '&thorn;', '&yuml;', '&quot;', '&amp;', '&lt;', '&gt;', '&OElig;',
      '&oelig;', '&Scaron;', '&scaron;', '&Yuml;', '&circ;', '&tilde;', '&ensp;', '&emsp;', '&thinsp;', '&zwnj;', '&zwj;', '&lrm;', '&rlm;', '&ndash;', '&mdash;',
      '&lsquo;', '&rsquo;', '&sbquo;', '&ldquo;', '&rdquo;', '&bdquo;', '&dagger;', '&Dagger;', '&permil;', '&lsaquo;', '&rsaquo;', '&euro;', '&fnof;', '&Alpha;',
      '&Beta;', '&Gamma;', '&Delta;', '&Epsilon;', '&Zeta;', '&Eta;', '&Theta;', '&Iota;', '&Kappa;', '&Lambda;', '&Mu;', '&Nu;', '&Xi;', '&Omicron;', '&Pi;',
      '&Rho;', '&Sigma;', '&Tau;', '&Upsilon;', '&Phi;', '&Chi;', '&Psi;', '&Omega;', '&alpha;', '&beta;', '&gamma;', '&delta;', '&epsilon;', '&zeta;', '&eta;',
      '&theta;', '&iota;', '&kappa;', '&lambda;', '&mu;', '&nu;', '&xi;', '&omicron;', '&pi;', '&rho;', '&sigmaf;', '&sigma;', '&tau;', '&upsilon;', '&phi;', '&chi;',
      '&psi;', '&omega;', '&thetasym;', '&upsih;', '&piv;', '&bull;', '&hellip;', '&prime;', '&Prime;', '&oline;', '&frasl;', '&weierp;', '&image;', '&real;',
      '&trade;', '&alefsym;', '&larr;', '&uarr;', '&rarr;', '&darr;', '&harr;', '&crarr;', '&lArr;', '&uArr;', '&rArr;', '&dArr;', '&hArr;', '&forall;', '&part;',
      '&exist;', '&empty;', '&nabla;', '&isin;', '&notin;', '&ni;', '&prod;', '&sum;', '&minus;', '&lowast;', '&radic;', '&prop;', '&infin;', '&ang;', '&and;',
      '&or;', '&cap;', '&cup;', '&int;', '&there4;', '&sim;', '&cong;', '&asymp;', '&ne;', '&equiv;', '&le;', '&ge;', '&sub;', '&sup;', '&nsub;', '&sube;', '&supe;',
      '&oplus;', '&otimes;', '&perp;', '&sdot;', '&lceil;', '&rceil;', '&lfloor;', '&rfloor;', '&lang;', '&rang;', '&loz;', '&spades;', '&clubs;', '&hearts;',
      '&diams;'
      ],
      arr2: ['&#160;', '&#161;', '&#162;', '&#163;', '&#164;', '&#165;', '&#166;', '&#167;', '&#168;', '&#169;', '&#170;', '&#171;', '&#172;', '&#173;', '&#174;',
      '&#175;', '&#176;', '&#177;', '&#178;', '&#179;', '&#180;', '&#181;', '&#182;', '&#183;', '&#184;', '&#185;', '&#186;', '&#187;', '&#188;', '&#189;', '&#190;',
      '&#191;', '&#192;', '&#193;', '&#194;', '&#195;', '&#196;', '&#197;', '&#198;', '&#199;', '&#200;', '&#201;', '&#202;', '&#203;', '&#204;', '&#205;', '&#206;',
      '&#207;', '&#208;', '&#209;', '&#210;', '&#211;', '&#212;', '&#213;', '&#214;', '&#215;', '&#216;', '&#217;', '&#218;', '&#219;', '&#220;', '&#221;', '&#222;',
      '&#223;', '&#224;', '&#225;', '&#226;', '&#227;', '&#228;', '&#229;', '&#230;', '&#231;', '&#232;', '&#233;', '&#234;', '&#235;', '&#236;', '&#237;', '&#238;',
      '&#239;', '&#240;', '&#241;', '&#242;', '&#243;', '&#244;', '&#245;', '&#246;', '&#247;', '&#248;', '&#249;', '&#250;', '&#251;', '&#252;', '&#253;', '&#254;',
      '&#255;', '&#34;', '&#38;', '&#60;', '&#62;', '&#338;', '&#339;', '&#352;', '&#353;', '&#376;', '&#710;', '&#732;', '&#8194;', '&#8195;', '&#8201;', '&#8204;',
      '&#8205;', '&#8206;', '&#8207;', '&#8211;', '&#8212;', '&#8216;', '&#8217;', '&#8218;', '&#8220;', '&#8221;', '&#8222;', '&#8224;', '&#8225;', '&#8240;',
      '&#8249;', '&#8250;', '&#8364;', '&#402;', '&#913;', '&#914;', '&#915;', '&#916;', '&#917;', '&#918;', '&#919;', '&#920;', '&#921;', '&#922;', '&#923;',
      '&#924;', '&#925;', '&#926;', '&#927;', '&#928;', '&#929;', '&#931;', '&#932;', '&#933;', '&#934;', '&#935;', '&#936;', '&#937;', '&#945;', '&#946;', '&#947;',
      '&#948;', '&#949;', '&#950;', '&#951;', '&#952;', '&#953;', '&#954;', '&#955;', '&#956;', '&#957;', '&#958;', '&#959;', '&#960;', '&#961;', '&#962;', '&#963;',
      '&#964;', '&#965;', '&#966;', '&#967;', '&#968;', '&#969;', '&#977;', '&#978;', '&#982;', '&#8226;', '&#8230;', '&#8242;', '&#8243;', '&#8254;', '&#8260;',
      '&#8472;', '&#8465;', '&#8476;', '&#8482;', '&#8501;', '&#8592;', '&#8593;', '&#8594;', '&#8595;', '&#8596;', '&#8629;', '&#8656;', '&#8657;', '&#8658;',
      '&#8659;', '&#8660;', '&#8704;', '&#8706;', '&#8707;', '&#8709;', '&#8711;', '&#8712;', '&#8713;', '&#8715;', '&#8719;', '&#8721;', '&#8722;', '&#8727;',
      '&#8730;', '&#8733;', '&#8734;', '&#8736;', '&#8743;', '&#8744;', '&#8745;', '&#8746;', '&#8747;', '&#8756;', '&#8764;', '&#8773;', '&#8776;', '&#8800;',
      '&#8801;', '&#8804;', '&#8805;', '&#8834;', '&#8835;', '&#8836;', '&#8838;', '&#8839;', '&#8853;', '&#8855;', '&#8869;', '&#8901;', '&#8968;', '&#8969;',
      '&#8970;', '&#8971;', '&#9001;', '&#9002;', '&#9674;', '&#9824;', '&#9827;', '&#9829;', '&#9830;'
      ],
      HTML2Numerical:function(s){return this.swapArrayVals(s, this.arr1, this.arr2);},
      NumericalToHTML: function(s){return this.swapArrayVals(s, this.arr2, this.arr1);},
      numEncode: function(s) {
      if (this.isEmpty(s)) return "";
      var a = [],
      l = s.length;
      for (var i = 0; i < l; i++) {
      var c = s.charAt(i);
      if (c < " " || c > "~") {
      a.push("&#");
      a.push(c.charCodeAt());
      a.push(";");
      } else {
      a.push(c);
      }
      }
      return a.join("");
      },
      htmlDecode: function(s) {
      var c, m, d = s;
      if (this.isEmpty(d)) return "";
      d = this.HTML2Numerical(d);
      arr = d.match(/&#[0-9]{1,5};/g);
      if (d.match("<br>")){d = d.replace(/<br>/g, "");}
      if (d.match("<br />")){d = d.replace(/<br \/>/g, "");}
      if (arr != null) {
      for (var x = 0; x < arr.length; x++) {
      m = arr[x];
      c = m.substring(2, m.length - 1);
      if (c >= -32768 && c <= 65535) {
      d = d.replace(m, String.fromCharCode(c));
      } else {
      d = d.replace(m, "");
      }
      }
      }
      return d;
      },
      htmlEncode: function(s, dbl, lf) {
      if (this.isEmpty(s)) return "";
      dbl = dbl || false;
      lf = lf || false;
      if (dbl) {
      if (this.EncodeType == "numerical") {
      s = s.replace(/&/g, "&#38;");
      } else {
      s = s.replace(/&/g, "&amp;");
      }
      }
      s = this.XSSEncode(s, false);
      if (this.EncodeType == "numerical" || !dbl) {
      s = this.HTML2Numerical(s);
      }
      s = this.numEncode(s);
      if (!dbl) {
      s = s.replace(/&#/g, "##AMPHASH##");
      if (this.EncodeType == "numerical") {
      s = s.replace(/&/g, "&#38;");
      } else {
      s = s.replace(/&/g, "&amp;");
      }
      s = s.replace(/##AMPHASH##/g, "&#");
      }
      if (lf){s = s.replace(/&#10;/g, "<br />\n");}
      else{s = s.replace(/&#10;/g, "\n");}
      s = s.replace(/&#\d*([^\d;]|$)/g, "$1");
      if (!dbl) {
      s = this.correctEncoding(s);
      }
      if (this.EncodeType == "entity") {
      s = this.NumericalToHTML(s);
      }
      return s;
      },
      XSSEncode: function(s, en){
      if (!this.isEmpty(s)){en = en||true;
      if (en){
      s = s.replace(/\'/g, "&#39;");
      s = s.replace(/\"/g, "&quot;");
      s = s.replace(/</g, "&lt;");
      s = s.replace(/>/g, "&gt;");
      }else{
      s = s.replace(/\'/g, "&#39;");
      s = s.replace(/\"/g, "&#34;");
      s = s.replace(/</g, "&#60;");
      s = s.replace(/>/g, "&#62;");
      }return s;
      }else{
      return "";
      }},
      hasEncoded: function(s) {
      if (/&#[0-9]{1,5};/g.test(s)) {
      return true;
      } else if (/&[A-Z]{2,6};/gi.test(s)) {
      return true;
      } else {
      return false;
      }},
      stripUnicode: function(s){return s.replace(/[^\x20-\x7E]/g, "");},
      correctEncoding: function(s) {return s.replace(/(&amp;)(amp;)+/, "$1");},
      swapArrayVals: function(s, arr1, arr2){
      if (this.isEmpty(s)) return "";var re;
      if (arr1 && arr2){
      if (arr1.length == arr2.length) {
      for (var x = 0, i = arr1.length; x < i; x++) {
      re = new RegExp(arr1[x], 'g');
      s = s.replace(re, arr2[x]);
      }}}return s;},
      inArray: function(item, arr) {
      for (var i = 0, x = arr.length; i < x; i++) {
      if (arr[i] === item) {return i;}}
      return -1;}}
      </script>
      <script type="text/javascript">
      var cflTmpCodeParsing='';
      var btnParsingMode='';
      function doClrInput(){
      cflTmpCodeParsing="";
      document.getElementById('txtInput').value="";
      document.getElementById("txtInput").focus();
      $('#cmdEncode,#cmdDecode').attr({"style": ""});
      $('#cmdEncode').attr({"onclick": "HTMLEncode()"});
      $('#cmdDecode').attr({"onclick": "HTMLDecode()"});
      }
      function HTMLEncode(){
      cflTmpCodeParsing=document.getElementById("txtInput").value;
      var db = document.getElementById('chkDouble').checked;
      var lf = document.getElementById('chkBr').checked;
      if (cflTmpCodeParsing == null || cflTmpCodeParsing == ""){alert("Document Empty !");return;}
      document.getElementById('txtInput').value = Encoder.htmlEncode(cflTmpCodeParsing, db, lf);
      $('#txtInput').css({"word-wrap": "break-word"});
      $('#txtInput').css({"white-space": ""});
      $('#cmdEncode').css({"background": "#333333"});
      $('#cmdEncode').attr({"onclick": ""});
      if(btnParsingMode=='decode'){
      $('#cmdDecode').attr({"style": ""});
      $('#cmdDecode').attr({"onclick": "HTMLDecode()"});
      }
      btnParsingMode='encode';
      }
      function HTMLDecode(){
      var tmpCode=document.getElementById("txtInput").value;
      if (tmpCode == null || tmpCode == ""){alert("Document Empty !");return;}
      document.getElementById('txtInput').value = Encoder.htmlDecode(tmpCode);
      $('#txtInput').css({"word-wrap": ""});
      $('#txtInput').css({"white-space": ""});
      $('#cmdDecode').css({"background": "#333333"});
      $('#cmdDecode').attr({"onclick": ""});
      if(btnParsingMode=='encode'){
      $('#cmdEncode').attr({"style": ""});
      $('#cmdEncode').attr({"onclick": "HTMLEncode()"});
      }
      btnParsingMode='decode';
      }
      var tmpSelectedCopy="";
      function copyFormCode(){
      if($('#txtInput').val()==""){return;}
      var position=$("#txtInput").prop('selectionStart');
      var selected=getSelectedText(document.getElementById("txtInput"));
      try{if (selected.length > 0){
      $("#txtInput").focus();
      document.execCommand("copy");
      tmpSelectedCopy=selected;
      }else{
      $("#txtInput").select();
      document.execCommand("copy");
      tmpSelectedCopy=$("#txtInput").val();
      }
      }catch(e){alert('Your browser does not support the HTML5 !');}
      }
      function getSelectedText(elm){
      if (typeof elm.selectionStart=="number"){
      return elm.value.slice(elm.selectionStart,elm.selectionEnd);
      }else if(typeof document.selection != "undefined"){
      var range=document.selection.createRange();
      if(range.parentElement()== elm){return range.text;}}
      return "";}
      </script>

    5. Save lalu lihat preview, jika sudah benar klik publish.
    Catatan:
    Alat Parser Kode HTML Blogger Premium Responsif bisa dimodifikasi tampilannya sesuai dengan tema blog anda, misalnya ukuran kotak untuk memparse scriptnya bisa diperbesar atau diperkecil atau warna latar belakangnya bisa dirubah sesuai dengan yang diinginkan. Penyesuaian bisa dilakukan melalui kode CSS.

    Parse HTML for blogger XML templates, convert to xml blogger template parse html, script blogger html to xml parser, parse html online, parse html python, How to parse HTML for blogger XML.

    Demikian sekiranya informasi yang dapat penulis berikan, apabila ada kata-kata yang kurang berkenan dan informasi yang kurang lengkap, penulis mohon maaf dan harap dimaklumi. Jangan lupa untuk melihat artikel lainnya yang berkaitan dengan pembahasan artikel ini karena bisa jadi ada tips dan trik yang mungkin tidak tertulis pada artikel ini namun tertulis di artikel lainnya yang masih berkaitan. Semoga bermanfaat.

    No comments

    Post Top Ad

    Post Bottom Ad