Hi dear monks !

am a bit dizzled by code-world of perl (after scripting
html ... ) now want to convert whole HTML-files
to xml-files with perl-module HTML::Tiny and
Have read the explanations in HTML::Tiny (short doc there)
I dont understand quite, what do I have to type with
command perl and module HTML::Tiny for to convert now
test01.html to test01.xml ? thx for answer and no
offense for somewhat newbie question of me.

So have understood by now, that to install cpan (as sudo) and to install HTML::Tiny (and I did install XML::Simple ).

Now I only need a converter for this - well then I found one at public IBM ...
here (modified by myself, but it is not correct):

HTMLin should be substituted by 'test001.html' ???

problem is this skript cannot find 'HTMLin'

There is only file test001.html.
What should I write now ?

thx very much !

#!/usr/bin/perl -w use strict; use HTML::Tiny; use Data::Dumper; my $Tiny = HTML::Tiny->new(); my $data = $Tiny->HTMLin('test001.xml'); # DEBUG print Dumper($data) . "\n"; # END
not to forget here the link of IntelligentBigMamah !

http://www.ibm.com/developerworks/xml/library/x-xmlperl1/index.html

saw answer of tobyink after I wrote above ... hm.


In reply to convert whole html-files to xml by dschinn1001

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.