[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

validating characters before libxml processing

Michael Brock

10/23/2008 1:35:00 PM

I have a Ruby/Rails script which receives data passed into it as a param
in xml format. This data is packaged up "remotely" and I don't have any
control over what it can contain other than that the contents of the
elements have had their html entities encoded into text. The problem
I'm having is that libxml is choking on some characters. The particular
instance that brought the problem to my attention is a string which
contains the â?? character (ascii 11).

I have been searching around and found several sites which seem to
address the problem but none seem to do the "whole job". I can strip
this specific character out obviously but given that libxml must have a
clearly defined set of valid characters it can handle, how do I process
that string before passing it to libxml to guarantee that it does not
contain any characters that libxml can't process without overdoing it?
--
Posted via http://www.ruby-....

2 Answers

A to Z

9/15/2008 10:45:00 AM

0


<emmapeachbuns@aol.com> wrote in message
news:88283130-0dbc-4e63-be81-5ae0721c6f8f@t54g2000hsg.googlegroups.com...
On Sep 14, 10:57?pm, "bbison" <bbis...@verizonn.nnet> wrote:
> <Bevch...@gmail.com> wrote in message
>
> news:205140db-dc7b-4789-af49-144d5596a4b9@t54g2000hsg.googlegroups.com...
> On Sep 14, 9:33 pm, "The Mighty TB" <partyslammer@sowcal. ahrahr.com>
> wrote:
>
> > "Dan" wrote:
>
> > > Cubs are taking a no hitter into the 9th
>
> > They got it.
>
> > T.B.
> >ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
> >Bev
>
> Sorry the no-no interrupted your viewing of this epic Sox collapse...

Well, not exactly.....

Jilly
----------------------

there are Sox west of the Berkshires


bbison

9/15/2008 2:42:00 PM

0

"A to Z" <POINTLESSaddietzDESPAM@comcastTHING.net> wrote in message
news:6j6sknF1nmlrU1@mid.individual.net...
>
> <emmapeachbuns@aol.com> wrote in message
> news:88283130-0dbc-4e63-be81-5ae0721c6f8f@t54g2000hsg.googlegroups.com...
> On Sep 14, 10:57?pm, "bbison" <bbis...@verizonn.nnet> wrote:
>> <Bevch...@gmail.com> wrote in message
>>
>> news:205140db-dc7b-4789-af49-144d5596a4b9@t54g2000hsg.googlegroups.com...
>> On Sep 14, 9:33 pm, "The Mighty TB" <partyslammer@sowcal. ahrahr.com>
>> wrote:
>>
>> > "Dan" wrote:
>>
>> > > Cubs are taking a no hitter into the 9th
>>
>> > They got it.
>>
>> > T.B.
>> >ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
>> >Bev
>>
>> Sorry the no-no interrupted your viewing of this epic Sox collapse...
>
> Well, not exactly.....
>
> Jilly
> ----------------------
>
> there are Sox west of the Berkshires
She was right, the White Sox came back (after blowing a 7-0 lead) and won.