I need to remove the processing instruction from a DOM. I load several files, merge them and save. But the problem is, that the result looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<frag>
Jó foxim és don Quijote húszwattos lámpánál ülve egy pár bűvös cipőt készít.
</frag>
<?xml version="1.0" encoding="iso-8859-2" standalone="no"?>
<frag>
Jó foxim és don Quijote húszwattos lámpánál ülve egy pár bűvös cipőt készít.
</frag>
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<frag>
Jó foxim és don Quijote húszwattos lámpánál ülve egy pár bűvös cipőt készít.
</frag>
I haven't found the way the <?xml ...?>
process instruction can be either removed from DOM or ignored when saving the resulting DOM. I'm using Java 6 and the default parser.