Okay, right on. The problem now is where I should do the encoding. XML::Parser bombs out and
dies as soon as it sees the ampersand, before it gets passed to the handler.
I want to be able to either scan the XML from a file or get it from a socket. Am I going to have to read the data from one of those two places first, do the encoding, then have XML::Parser parse the results? That seems hard, because I'd have to decide before parsing what should be parsed (I don't want to go replacing the quotes around XML attributes with " - the XML parser wouldn't be able to parse).
Is there some easier way to do the encoding? Is there any way at all I can keep XML::Parser from crapping out before I get a chance to replace the ampersand?
Thanks...
---
donfreenut
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.