You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by sw...@iFulfillment.com on 2001/08/15 20:46:08 UTC
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
Re: Parsing failures with '&'
Posted by Bob Jamison <rj...@lincom-asg.com>.
Also, this one is cool:
 
is the same as ' ' in HTML,
and is -really- useful for XSLT, since
it can be passed through.
Bob
---------------------------------------------------------------------
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
Re: Parsing failures with '&'
Posted by yudo pria <yu...@rileks.co.id>.
i've tried the following replacement,
and this far it works ..
Name Code Number Code Glyph Description
�-
 unused
	 horizontal tab
line feed
 unused
  space
! ! exclamation mark
" " " double quotation mark
# # number sign
$ $ dollar sign
% % percent sign
& & & ampersand
' ' apostrophe
( ( left parenthesis
) ) right parenthesis
* * asterisk
+ + plus sign
, , comma
- - hyphen
. . period
so, you have to replace on the query
(or whenever you'd like)
like this :
replace(fieldName,'&','&') 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: <sw...@iFulfillment.com>
To: <ge...@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
RE: Parsing failures with '&'
Posted by ve...@suplicity.com.
there may not be a short cut method as XML is already built,
but one can look for suspected tags (using StringTokenizer etc) and replace
"&" with "&".
thanks
venu
-----Original Message-----
From: swallace@iFulfillment.com [mailto:swallace@iFulfillment.com]
Sent: Wednesday, August 15, 2001 2:46 PM
To: general@xml.apache.org
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