Gerd Wagner wrote:
> We plan to use XXE in a university course on Web document
> technologies.
>
> I've the following question: can I change/edit the XML
> prolog with XXE? This is an issue, e.g., for XHTML documents
> since IE5+6 does not like the XML declaration while Firefox
> has no problem with it.
>
XXE can only be used to edit the contents and attributes of the root
element of an XML document. Therefore you cannot manipulate the XML
prolog using XXE.
The basic idea to solve this problem is to use an XHTML page *template*
not having the XML prolog which causes IE to display the document as an
XML tree. By systematically using this IE-friendly template, you make
sure that all the pages you'll create with XXE will be accepted by IE.
Caution: if you suppress:
<?xml version="1.0" encoding="ISO-8859-1"?>
make sure to save all your documents using the the UTF-8 encoding or
better[*], using the US-ASCII encoding (this does not prevent using
characters outside this encoding. These characters will simply be
escaped in the saved file: , é, etc). For that, use
Options|Options, Save section, once for all.
---
[*] Using the UTF-8 encoding also implies adding this:
<meta content="text/html; charset=UTF-8"
http-equiv="Content-Type" />
to your template.