You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by mischa o <st...@yahoo.com> on 2003/06/27 02:28:34 UTC

entity subsititution

hi guys:
 
I have an xml document that contain the data like
<data> something & something </data>
 
the xerces parser throws an exception stating that it should contain ;. i knew that this is not a valid xml document. but still i wanted the xerces to parse this data and accept & as it is.
I believe there is some way where the xerces accepts & as it is and concerts @amp; to &
 
can u tell how this can be done. any solution will be greatly appreciated.


---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Re: entity subsititution

Posted by Joseph Kesselman <ke...@us.ibm.com>.



>i knew that this is not a valid xml document. but still i wanted the
xerces to parse this data
>and accept & as it is.

Xerces is an XML parser. If your document isn't well-formed XML, you
shouldn't expect Xerces -- or any other XML tool -- to process it.

You could try putting your document through the W3C's "tidy" tool, which
attempts to fix broken documents. As in lenient browsers, the fixes are
applied by heuristic guesswork, and the results are not guaranteed to be
correct or even reasonable. It's better to fix your document at the source.

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org