[fpc-devel] XML Parser problems with C-Data and Character Encoding

Andrew Brunner atbrunner at aurawin.com
Wed Sep 26 21:21:35 CEST 2012


 From time to time I get XML parsing exceptions even though I disabled 
data validation.

If c-data contains any character whose ordinal value is greater than 127 
the XML parser raises an exception.

I realize fpc's parser is not the only one with this problem.  So who's 
infinite wisdom decided that C-Data cannot have non-keyed input!?!

Is there a ANY case where dropping c-data is OK just because a user 
hasn't entered it?  I'm just curious... I can't seem to find any good 
reason as to why this happened other than to force UTF or some other 
encoding on everyone.

The XML parser already has options for Validation.  I'm hoping to get 
someone on the team to add a one line if Validation=true then check the 
values else just parse it already.

http://mantis.freepascal.org/view.php?id=22990

Another thing would be to have an exception level event.  There is an 
event there, but still the exception is raised the event is called - 
stopping the parsing and throwing a wrench in my streaming application 
logic.

In a world where XML is just about the primary choice for data 
transmission - I think we take speed as the ut-most priority and don't 
use such a pivotal technology as a tool to get what someone else wants.

The bottom-line inference here is that WE ALL must encode ALL DATA 
before it can be streamed / parsed.  That's bad news and EXPENSIVE.

Therefore, any help would be greatly appreciated.

-- 
Andrew Brunner

Aurawin LLC
512.574.6298
http://aurawin.com/

Aurawin is a great new place to store, share, and enjoy your
photos, videos, music and more.




More information about the fpc-devel mailing list