Do something like this before passing your text to the XML parser?
But I think Re: Maximum parsing depth with XML::Parser? probably does a better job of this and implies the the greater-thans aren't a problem.s/&(\W|$)/&$1/g; s/<([^/\w]|$)/<$1/g; s/(^|\W)>/$1>/g;
I recall a module like this for HTML. It would find common mistakes (like unquoted attributes) and fix them. Something like that would be even more useful as a module for XML since the spec says to reject invalid input.
- tye (but my friends call me "Tye")In reply to (tye)Re: Dealing with Malformed XML
by tye
in thread Dealing with Malformed XML
by Coyote
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |