Hello. I'm hoping someone may be of some assistance. I am working with XML::Parser::Expat mod and I'm having trouble resolving external entities using the ExternEnt Handler. My whole purpose is to resolve each entity to it's ASCII equivalent OR strip out the entity if it's no in the my entity list. I'm declaring the external entities in my XML
files like so:
<!DOCTYPE name SYSTEM "[some path]/entity.list">
The entity.list has all my entities. One example is:
<!ENTITY é "e">
When I parse each XML file the ExternEnt Handle is not being hit or
called. I'm assuming it's not recognizing my file of entities. Am I
missing something? Do you have any insight as to what I'm doing wrong?
What I did do was take some of the entities in my list and place them
directly in my XML file like so:
<!DOCTYPE name SYSTEM "/[some path]/entity.list"
[
<!ENTITY é "e">
]>
Then I used the Entity Handler, and it worked! The entity resolved to
the appropriate value. This is not the ideal method for me to used though because I have no control in creating the XML file.
I hope I have given enough detail and I hope that you are able to help OR point me in the right direction to come up with the answer to my problem. I would greatly appreciate any advice or comments. Thanks!
Adam J. Dobrozsi
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.