xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "yudo pria" <y...@rileks.co.id>
Subject Re: Parsing failures with '&'
Date Wed, 15 Aug 2001 19:15:05 GMT
i've tried the following replacement,
and this far it works ..

      Name Code Number Code Glyph Description 
        
     &#00;-
      &#08;  unused 
     &#09;  horizontal tab 
     &#10;  line feed 
     &#11;   unused 
     &#32;  space 
     &#33; !   exclamation mark 
      &quot; &#34; "   double quotation mark 
     &#35; #   number sign 
     &#36; $   dollar sign 
     &#37; %   percent sign 
      &amp; &#38; &   ampersand 
     &#39; '   apostrophe 
     &#40; (   left parenthesis 
     &#41; )   right parenthesis 
     &#42; *   asterisk 
     &#43; +   plus sign 
     &#44; ,   comma 
     &#45; -   hyphen 
     &#46; .   period 

so, you have to replace on the query 
(or whenever you'd like)
like this :

replace(fieldName,'&','&amp;') as fieldName

or if you already have the .xml files,
you can perform the process 
right before sending it into parser.

hope it helps,
yudo.


----- Original Message ----- 
From: <swallace@iFulfillment.com>
To: <general@xml.apache.org>
Sent: Thursday, August 16, 2001 1:46 AM
Subject: Parsing failures with '&'


> We have a situation where a client has the ampersand character in product
> descriptions submitted to us in XML.  For a fictious example, assume
> <description>M & M</description>.  The crimson parser fails with "Illegal
> character or entity reference syntax".
> 
> Is there anyway around this problem short of writing a replacement script
> before sending it to the parser?
> 
> Thanks in advance.
> 
> Scott
> 
> 
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
> 
> 


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message