/ Published in: Perl
URL: http://search.cpan.org/~mlawren/XML-API-0.18/lib/XML/API/XHTML.pm
Build a simple XHTML document, format it with Tidy and print the result to "temp.html."
You may first need to cpan XML::API::XHTML, and install Tidy using your favorite package manager, or just download Tidy by itself
On my system, CPAN complained that "make test had returned bad status" during installation of XML::API::XHTML. To solve this I started the CPAN shell (just type cpan) and then forced the install, like this:
cpan> force XML::API::XHTML
Expand |
Embed | Plain Text
perl -e "use XML::API::XHTML; my $d = new XML::API::XHTML(); $d->head_open(); $d->title('hello world!'); $d->script({type => 'text/javascript'}, '/* hello scripts! */'); $d->head_close(); $d->body_open(); $d->h1({style => 'color:red'}, 'Hi nerd!'); print $d;" | tidy -q -o temp.html
You need to login to post a comment.
