2c2 < // flatten_ml.php --- > // tags_within.php 6c6 < // Convert HTML or XML to Text --- > // Report on tags within tag 9,24d8 < $esuff = ""; < $start = "<"; < $end = " 1) { < $end = substr($start,1); < $start = substr($start, 0, 1); < } 27c11 < global $fsev, $start, $end; --- > global $fsev; 31,32d14 < var wut = new Array(); < var wutname = new Array(); 54,64d35 < function expand(onein, twoin) { < var outtwoin = ""; < < var div = document.getElementById("dend"); < div.innerHTML = twoin; < outtwoin = ""; < < < return onein + "  " + outtwoin; < } < 140,141d110 < wutname[wutname.length] = f.name; < wut[wut.length] = window.open("",f.name,"width=500, height=80"); 156,157c125 < var xfcont=evt.target.result,ik,eoc,eik,tcont=""; < var thoselines = xfcont.split(String.fromCharCode(10)); --- > var xfcont=evt.target.result; 159,179c127,136 < var findwordscnt = 0, cfinds, rconts, cfind = "0", huhv, pref="", ihuh, ht; < var cstart="' . substr($start,0,1) . '", cend="' . str_replace("{", "}", str_replace("<", ">", str_replace("[", "]", str_replace("(", ")", substr($start,0,1))))) . '"; < var fws, fwsc="", rcont = " ", bit, outtwoin = "", oc = xfcont.split(cstart); < < var div = document.createElement("div"); < div.innerHTML = xfcont; < if (xfcont.toLowerCase().indexOf("= 0) { < for (ik=0; ik 1) { < for (eik=1; eik" + tcont || "" + ""); < wut[eval(wut.length - 1)].document.title = wutname[eval(wut.length - 1)] + ".txt"; < } else if (xfcont.toLowerCase().indexOf("html>") >= 1) { < wut[eval(wut.length - 1)].document.write("  "); < wut[eval(wut.length - 1)].document.title = wutname[eval(wut.length - 1)] + ".txt"; --- > var findwordscnt = 0, cfinds, rconts, cfind = "0", huhv, pref="", ihuh, ht; > var fws, fwsc="", rcont = " ", bit; > /' . '/var thoselines = xfcont.split(String.fromCharCode(10)); > var ourwords, ourwordcnt = 0; > var endtt = document.getElementById("start").value.substring(0,1) + document.getElementById("ctag").value; > var endd = document.getElementById("start").value.substring(0,1).replace("<",">").replace("[","]").replace("{","}").replace("(",")"); > var ourat = document.getElementById("attrib").value; > thoselines = xfcont.split(document.getElementById("start").value.substring(0,1) + document.getElementById("ptag").value); > if (ourat == "") { > cfind = eval(thoselines.length - 1); 181,185c138,142 < thoselines = xfcont.replace(//g, ">").split(String.fromCharCode(10)); < for (var jjjjq=0; jjjjq"; --- > cfind = 0; > for (var jjjjk=1; jjjjk if (thoselines[jjjjk].substring(0,1) == " " || thoselines[jjjjk].substring(0,1) == endd) { > if (thoselines.indexOf(ourat) < thoselines.indexOf(endd)) cfind = eval(1 + cfind); > } 187,188d143 < wut[eval(wut.length - 1)].document.title = wutname[eval(wut.length - 1)]; < wut[eval(wut.length - 1)].document.write(xfcont); 190,197c145,150 < /' . '/document.getElementById("dend").innerHTML = document.getElementById("dend").innerHTML + "  @!@"; < < var thosewordscnt = 0, thosewords = xfcont.split(String.fromCharCode(32)); < < var ourwords, ourwordcnt = 0; //infilecontents.split(String.fromCharCode(32)); < for (var jjjj=0; jjjj rconts = xfcont.split(document.getElementById("start").value.substring(0,1) + document.getElementById("ctag").value); > rcont = eval(rconts.length - 1); > for (var jjjjm=1; jjjjm if (rconts[jjjjm].substring(0,1) != " " && rconts[jjjjm].substring(0,1) != endd) { > coff = eval(1 + coff); > } 199,207c152,170 < < if (document.body.innerHTML.indexOf("~" + "~") == -1) { < document.body.innerHTML = document.body.innerHTML + ""; < } else { < document.body.innerHTML = document.body.innerHTML.replace("~" + "~", ";" + document.getElementById("url").value + "~" + thoselines.length + "~" + thosewordscnt + "~" + "~"); < } < var sofar = document.getElementById("my" + "res").innerHTML; < var sofars = sofar.split(";"); < var sofarlw; --- > for (var jjjj=1; jjjj if (thoselines[jjjj].substring(0,1) == " " || thoselines[jjjj].substring(0,1) == endd) { > ht = thoselines[jjjj].split(endtt + endd); > thosewordscnt = eval(thosewordscnt + ht.length - 1); > ht = thoselines[jjjj].split(endtt + " "); > thosewordscnt = eval(thosewordscnt + ht.length - 1); > } else { > poff = eval(1 + poff); > } > } > if (document.body.innerHTML.indexOf("~" + "~") == -1) { > document.body.innerHTML = document.body.innerHTML + ""; > } else { > document.body.innerHTML = document.body.innerHTML.replace("~" + "~", ";" + document.getElementById("url").value + "~" + eval(thoselines.length - 1 - poff) + "~" + thosewordscnt + "~" + cfind + "~" + eval(rcont - coff) + "~" + "~"); > } > var sofar = document.getElementById("my" + "res").innerHTML; > var sofars = sofar.split(";"); > var fwcnt = 0, ht, fto2; > var sofarlw; 215c178,181 < document.getElementById("w" + j).innerHTML = sofarlw[2]; --- > document.getElementById("w" + j).innerHTML = sofarlw[2]; > document.getElementById("f" + j).innerHTML = sofarlw[3]; > document.getElementById("r" + j).innerHTML = sofarlw[4]; > 224c190 < output.push("
  • Filename is ", escape(f.name), " ... Type is (", f.type || "n/a", ") ... Date is ", --- > output.push("
  • Filename is ", escape(f.name), " ... Type is (", f.type || "n/a", ") ... Date is ", 226c192 < f.size, " bytes ... Line Count is ", "", " ... Word Count is ", "", "", --- > f.size, " bytes ... Total (Relevant) Parent/Child tag counts are ","()/", "", "", " ... Total Child tag count Within Parent Tag is ", "", "", "", "", 256a223,224 > $start = "<"; > $end = " if (isset($_GET['start'])) { > $start = urldecode($_GET['start']); > } else if (isset($_POST['start'])) { > $start = urldecode($_POST['start']); > } > if (isset($_GET['end'])) { > $end = urldecode($_GET['end']); > } else if (isset($_POST['end'])) { > $end = urldecode($_POST['end']); > } 348c326 < echo '

    Convert HTML or XML to Text



    ' . "\n"; --- > echo '

    Find ' . str_replace("<", "<", str_replace(">", ">", $ctag)) . ' Tags Within ' . str_replace("<", "<", str_replace(">", ">", $ptag)) . ' Tags With or Without Attributes ' . str_replace("<", "<", str_replace(">", ">", $attrib)) . '



    ' . "\n"; 350c328 < echo '

    Text version of ' . $url . ' ...



    ' . "\n"; --- > echo '


    ' . "\n"; 447,454c572,578 < //echo 'Parent (in) tag:

    ' . "\n"; < //echo 'Child (within) tag:

    ' . "\n"; < //echo 'Parent Attribute search (optional):

    ' . "\n"; < //echo 'Start delimiter:

    ' . "\n"; < echo 'Delimiters:

    ' . "\n"; < //echo 'End delimiter:


    ' . "\n"; < echo '

    ' . "\n"; < echo '' . "\n"; --- > echo 'Parent (in) tag:

    ' . "\n"; > echo 'Child (within) tag:

    ' . "\n"; > echo 'Parent Attribute search (optional):

    ' . "\n"; > echo 'Start delimiter:

    ' . "\n"; > echo 'End delimiter:


    ' . "\n"; > echo '

    ' . "\n"; > echo '' . "\n"; 480c604 < echo '

    Convert HTML or XML to Text


    URL comma separated allowed


    Local web server file:// with/without * for filespecs allowed ... eg. file://./*.*ml


    ' . "\n"; --- > echo '

    Find Tags Within Tags With or Without Attributes

    URL comma separated allowed


    Local web server file:// with/without * for filespecs allowed ... eg. file://./*.*ml


    ' . "\n"; 483,490c607,613 < //echo 'Parent (in) tag:

    ' . "\n"; < //echo 'Child (within) tag:

    ' . "\n"; < //echo 'Parent Attribute search (optional):

    ' . "\n"; < //echo 'Start delimiter:

    ' . "\n"; < echo 'Delimiters:

    ' . "\n"; < //echo 'End delimiter:


    ' . "\n"; < echo '

    ' . "\n"; < echo '' . "\n"; --- > echo 'Parent (in) tag:

    ' . "\n"; > echo 'Child (within) tag:

    ' . "\n"; > echo 'Parent Attribute search (optional):

    ' . "\n"; > echo 'Start delimiter:

    ' . "\n"; > echo 'End delimiter:


    ' . "\n"; > echo '

    ' . "\n"; > echo '' . "\n";