Can I enforce escapeing on XML reserved chars?

Dear All,

We have a constraint attribute which can contain Xpath statements e.g.

"count(glossaryOfTerms) < 1"

& other places where people have to insert XML fragments as examples of 
what a message etc should look like.

Is there any way to enforce the above becoming :

"count(glossaryOfTerms) &lt; 1"


?


TIA


Adam


**********************************************************************
This message  may  contain  confidential  and  privileged information.
If you are not  the intended  recipient please  accept our  apologies.
Please do not disclose, copy or distribute  information in this e-mail
or take any  action in reliance on its  contents: to do so is strictly
prohibited and may be unlawful. Please inform us that this message has
gone  astray  before  deleting it.  Thank  you for  your co-operation.

NHSmail is used daily by over 100,000 staff in the NHS. Over a million
messages  are sent every day by the system.  To find  out why more and
more NHS personnel are  switching to  this NHS  Connecting  for Health
system please visit www.connectingforhealth.nhs.uk/nhsmail
**********************************************************************

Received on Thursday, 15 May 2008 11:18:50 UTC