[eluser]xwero[/eluser]
If xml data is embedded the <? characters should be followed by xml so i think you can filter the xml doctype?
something like
Code:
preg_replace('/(<\?(?!xml).+?\?>)/','',$line);
edit : skip my remark preg_replace isn't binary safe.