Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

Matts
  (email not shown publicly)

I work for MessageLabs [messagelabs.com] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Monday September 10, 2001
05:49 AM

DSL and XML Parsing

[ #779 ]

DSL is installed. Whee! DSL is not working. Boo!

Apparently Clara.net are not seeing my radius authentication requests. Which means BT aren't forwarding them or something. So the result is I have this nice DSL line installed, but I can't access the outside world (or vice-versa) yet. Maybe later today though.

My XML parser is coming along now. Element parsing, namespace processing, and attributes all work. Sweet. I found out there's a nasty buggette in how I'm doing the encoding switching. I read in the first 4 bytes of the document to detect the encoding (as per the XML spec), and then switch. But if I detect it right on the 2nd byte, I switch then. However due to the way the Reader class works, I've actually read in 3 bytes at that point (and if it was a 4-byte per character encoding, I would have read in 5 bytes), so switching encodings happens across a character boundary, and screws things up royally. I'll have to figure out a better way to do that.

I also need to fix the parsing to have parse() accept multiple options, and also accept a Source option a-la the Perl SAX2 spec. Have to get that done soon or I'll have way too many test cases to fix. I hope people don't mind too much that bleedperl is required. There didn't seem to be *too* much objection on Perl-XML when I posted the preview version.