Hello,

i'm using the XML::SAX::PurePerl-parser because i'm not able to use anything other than pure perl.

Is there a way to send unkown entities to an default handler like it is possible with XML::Parser? I need to do some more complicated tasks with those entities than replacing it with text.

Right now i'm also stuck at a weird problem: My XML file contains <tag>&lt;SOMETHING&gt;</tag> this seems to be resolved to <tag><SOMETHING></tag> and leads to an 'Invalid element name'-error. I can't believe this is the proper behavior - any suggestions?

Feel free to ask if i should point something out in more detail.

Thank you

VR

UPDATE: I accidentally added &lt; and &gt; to the dtd-entities. This caused the 'Invalid element name'-error.

I think it could work, but it's rather inconvenient to generate <!ENTITY entname "replacement"> for each of my custom-entities


In reply to XML::SAX::PurePerl, handle entities by VirtualRider

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.