I promise, I've already been through the Super Search route, but I have to wonder about the validity and up-to-dateness of nodes in the present wave of XML fever.

In a nutshell, all I want to do is check if some XML is well formed. I don't want to know anything about it, just see if it's well formed.

The background is that I have 20,000 hand written HTML files from which I have stripped the "useful" data. This comes to in the form of a snippet of HTML. Now, the client has come back informing me that they want it in XML, or at least a snippet of well formed XML.

XML::Parser with no handlers seemed a good plan, but then, it can only be used once per instance and croaks of the XML is not well formed.

OK, so can wrap it up in eval, but then, is all seems a bloated. But then, I'm not really in a position to comment, on the performance overhead.

Another plan was to preconvert the HTML to XHTML, but that looks to take ages.

You wisdom would be appreciated.

--
Brother Marvell


In reply to well formed xml by marvell

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.