Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

WAP Compiler Test

by rdw (Curate)
on Oct 16, 2000 at 15:49 UTC ( #36885=snippet: print w/replies, xml ) Need Help??
Description: Just a tiny little script that takes a list of URLS, fetches them and compiles them.
Useful for checking all your pages will fit on the phone.
#! /usr/bin/perl -w

use strict;

use LWP::Simple;
use CGI::WML;

foreach my $url (@ARGV) {
  my $wml = get($url);
  if ($wml) {
    my $wmlc = CGI::WML->wml_to_wmlc(-wml => $wml);
    if ($wmlc) {
      printf "$url => WML:%d WMLC:%d\n",length($wml),length($wmlc);
    }
    else {
      print "Failed to compile $url\n";
    }
  }
  else {
    print "Failed to fetch $url\n";
  }
}
Replies are listed 'Best First'.
Re: WAP Compiler Test
by Anonymous Monk on Aug 23, 2008 at 15:55 UTC
    <?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"><wml> <card id="no1" title="Go to URL"> <do type="options" label="Go"> <go href="check.wmls#go_url('W3Schools')"/> </do> </card> </wml>
Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: snippet [id://36885]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2021-01-28 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?