B
Bart van den Burg
Hi
I showed my code to someone a while ago, and he said that it's rather
unclean to have XHTML code within the Perl code. I must agree with this,
because it doesn't really look al that nice, but I don't really know how to
do it better.
I've been playing around with XML::Smart, only to find out it's not really
going to work, because it's rather hard to make constructions like <div>text
<a href="something">link</a> more text</div>, without putting each piece in
it's own element (i.e.: <div><span>text</span> <a
href="something">link</a><span>more text</span></div>). AFAIK, it's not even
possible.
Then I started to play a little with XML:
OM. Nice as well, but it seems to
miss out some important functions for use with XHTML, for example:
getElementById(), since this, of course, is only from (X)HTML, and not for
XML.
I'm wondering what the best way is. I'm not necessarily looking for a
module. Some other way might be nice as well, but it would be cool to be
able to change, for example, the <title>, or add some <meta> tags.
Any ideas?
Thanks!
I showed my code to someone a while ago, and he said that it's rather
unclean to have XHTML code within the Perl code. I must agree with this,
because it doesn't really look al that nice, but I don't really know how to
do it better.
I've been playing around with XML::Smart, only to find out it's not really
going to work, because it's rather hard to make constructions like <div>text
<a href="something">link</a> more text</div>, without putting each piece in
it's own element (i.e.: <div><span>text</span> <a
href="something">link</a><span>more text</span></div>). AFAIK, it's not even
possible.
Then I started to play a little with XML:
miss out some important functions for use with XHTML, for example:
getElementById(), since this, of course, is only from (X)HTML, and not for
XML.
I'm wondering what the best way is. I'm not necessarily looking for a
module. Some other way might be nice as well, but it would be cool to be
able to change, for example, the <title>, or add some <meta> tags.
Any ideas?
Thanks!