Asger Joergensen wrote:
> Hi Peter
>
> Peter Flynn wrote:
>
>> Asger Joergensen wrote:
>> [...]
>>> Thes characters are not alowed in the text in XML files
>>> & " ' < >
>>> they are reserved for tags and they must be translated to
>>> & " ' < >
>> No, only & and < are forbidden in text unless escaped. The characters
>> " ' > are just text and do not require escaping, although > acquires a special meaning in a start-tag or end-tag, and " and ' are bound by rules of matching and nesting when used in attributes.
>
> You are of cource right, BUT it is commen / good practise to escape
> all five.
Possibly. It depends what system you are writing for. If you are writing
normal text, you probably want to avoid " and ' as quotes completely,
and use real (curly) open-and-close quotes (single and double) and keep
the ' for an apostrophe. The > occurs very rarely in normal text. When
used in its mathematical sense, it will of course be inside some kind of
<math> element; either way it is a matter of personal preference whether
you use it raw or in the form of a character reference.
> http://www.w3schools.com/xml/xml_syntax.asp
The W3Schools pages are not always reliable or accurate (these ones are OK).
///Peter