Re: a small question on xml

Sean Mc Grath (digitome@iol.ie)
Tue, 18 Aug 1998 12:33:24 +0100


>> Will someone help me with the representation of special characters
>>in .xml files? For example,
>>
>> <someexpression original-from="(relation 5 "abc")">
>> or
>> <someexpression original-from="(< 2 5)">
>>
>> I used IBM Parser for XML, but it shows some error. It seems that
>>" and < are not properly represented.

The "<" character is very special in XML and should only appear
when you want the parser to treat what follows as some sort
of markup. In all other cases, use "&lt;" which is a built
in "entity" that the parser knows about that translates post-parse
to the "<" character. The ">" character is less constrained but
it is good defensive authoring practice to escape it as well using
"&gt;"

Sean

Book of condolences for the Omagh bombing:
http://www.rte.ie/condolences.html