[Home] [By Thread] [By Date] [Recent Entries]

  • To: asim <qazi@a...>
  • Subject: Re: The '&' Problem
  • From: Julian Reschke <julian.reschke@g...>
  • Date: Sat, 01 Nov 2003 09:47:33 +0100
  • Cc: xml-dev@l...
  • In-reply-to: <002401c3a02f$c0c8ad70$b400a8c0@asim>
  • References: <002401c3a02f$c0c8ad70$b400a8c0@asim>
  • User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3

asim wrote:

> Hi All
>     I querry a database table and make a XML packet dont know which 
> field can contain '&' .. what should i do so that my parser should not 
> break will parsing ....
>  
> Qazi Asim

Escape it as "&amp;". And do not forger "<" ("&lt;") and possible issues 
with non-ASCII characters in case you're not using ASCII.

Julian

-- 
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member