So, I think the problem is you need to check the man page for XML::Parser. You're passing a file name to the "parse()" method, but you should be passing the file name to the "parsefile()" method. ("parse()" is expecting its argument to be an xml string or a file handle that you've already opened, not a file name.)

(update: apart from the lesson you've learned now about posting valid sample data, let me also suggest that you trim your code down to the minimal snippet needed to demonstrate the problem. I had to filter out all that database crud to see the error for myself, and only then did I realize that you were using the wrong method call.)


In reply to Re^3: XML::Parser SAX error by graff
in thread XML::Parser SAX error by bcnagle

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.