in reply to Re^4: XML::SAX::PurePerl, handle entities
in thread XML::SAX::PurePerl, handle entities
Sorry about parse_string
If there is no way to send unkown entities to an handler/method, i need to generate the doctype-entity-section at runtime
There's no such thing as an unknown entity. Entities must be declared for the document to be valid. Usually, they are declared in an external DTD, but if you want to include the declaration inside the document, that's your prerogative.
That said, parsers usually provide hooks to avoid the need to download and parse DTD. I don't know if XML::SAX and XML::SAX::PurePerl offer any.
That said, lt and gt aren't unknown entities, and it's definitely not safe to change their meaning as you are doing. In fact, you are causing the very problem you asked about. As previously demonstrated in one post and previously mentioned in another, don't do that.
|
|---|