> Apart from the problem of having to specify all the possible tag names up front in an array, this approach
> will fail to pick up on certain problems that are quite common, such as:
>
> <foo><bar> blah blah </foo></bar>
True, but again all he said he was looking for was to see if all open tags had a close tag, not if the ordered syntax was correct. Also he stated that he was only searching for a few tags and NOT the entire range of possible HTML tags so the array approach would be sufficient for his implementation, though a bad idea on a large scale parser.
All html parser modules I am aware of would not do what he is looking for since they basically parse the text inside the tags and do nothing with the actual tags themselves except demilit on them.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.