Out of the box, TinyXML should be able to deal with processing instructions normally. However, tinyxmlparser keeps identifying the XML declaration by the prefix "<?xml" which catches more than just the declaration: for example it catches all stylesheet declarations ("<?xml-stylesheet ...") and maybe other tags as well.
This patch just changes the prefix to "<?xml ", adding a trailing space in the check. That should work for pretty much everything except the superfluous "<?xml?>"
Log in to post a comment.