From: Graham B. <gb...@po...> - 2000-05-26 14:15:02
|
On Fri, May 26, 2000 at 08:58:20AM -0500, Mark Wilcox wrote: > > > Graham Barr wrote: > > > On Thu, May 25, 2000 at 08:01:11PM -0500, Mark Wilcox wrote: > > > Hi, > > > Here's my first version of Net::DSML (and the helper module XML::DSML > > > which you could use seperately, but it's probably easier to use > > > Net::DSML). > > > > This is a great start. > > Thanks. Last night I noticed a bug in my Base64 code for Net::LDAP::DSML, so I'm shipping > a new copy. > > Also I've made a patch to Net::LDAP::Entry so that the dump() method will Base64 encocde > binary in the ouptut. OK, great. > > In XML::DSML you have a comment about renaming the module as Net::LDAP::DSML::Parser. > > > > My answer would be that if it is a generic DSML parser, not connected with Net::LDAP, > > then XML::DSML is probably the right place for it to live. > > Yeah that's what I'm thinking as well, but I wanted to get something out for people to > play with and then figure out the best way to go. > > > > > > > I have not tried the code, but from looking at it I have one concern. > > It seems that the whole DSML file must be read into memory in one go. > > I'll have to double-check this. I can't remember if XML::Parser's callback functions use > streaming or load the whole file. XML::Parser I think always works on a whole file. But I think you can use XML::Parser::Expat which is the low-level access. > > This will be a disadvantage for large files and we should probably devise a way > > to read the entries one at a time. > > I'll double check, but worst-case I can rewrite it so that XML::Parser streams in the > file. Sure. One other thing to consider. I assmue the DSML does not specify an order for things to appear in the file if it contains entries and a schema. So you need to consider what to do if the user asks to read an entry when the next thing is a schema, and visa-versa. Graham. |