in reply to parsing reserved chars with xml::simple
You can't easily escape the reserved characters in the not-quite XML without a heuristic parser. For example, & is the entity for encoding &. You wouldn't want to turn that into &. Also, < and > are reserved characters with < and > for entities. How would you distinguish between bad characters in text and the real tags?
The only place that knows what is text and what is elements is the source of the XML. You need to fix the source of the XML that is not encoding special characters to entities in text and attribute values.
|
|---|