Date: Sun, 15 Sep 2002 03:10:12 -0700 From: Sean Chittenden <sean@chittenden.org> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: ports@FreeBSD.org Subject: Re: expat2 in /src Message-ID: <20020915101012.GK85674@perrin.int.nxad.com> In-Reply-To: <87338.1032083437@critter.freebsd.dk> References: <20020915093729.GJ85674@perrin.int.nxad.com> <87338.1032083437@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
> >> I need to import expat2 into /src to get some basic XML reading > >> capability, and expat2 being both small and good fits this slot. > > > >Any reason you wouldn't use libxml2's SAX interface? It's also got > >a slick DOM interface that I highly recommend, as well as it being > >the most feature complete XML opensource implementation (has a XSL > >engine that works with libxml2 and an XMLsec library) that I'm > >aware of (and MIT licensed too). > > I initially played with libxml2, but it is HUGE and I think most of > its features are significantly suplus to current requirements. > > I'm not against libxml2, I just can't justify it: All I need is the > ability to read an XML file into a tree, from where C code can do > what it wants to do. > > >PS I am skeptical of a need for any kind of XML parser in the base > >tree though, [...] > > GEOM being an extensible framework, exports configuration > information from the kernel in XML format. Using XML means that > there is no magic .h filled with #defines and arcane structs to > represent information for all the possible methods it may grow over > the years, and it means that standard text tools, xml or not, can be > used on the configuration data, instead of only one special C-code > program. > > I realize that XML from the kernel is a rather staggering idea, but > FreeBSD is also about progress... :-) Not disagreeing with you there. I know you've probably thought this out more than I, however I'm just playing devils advocate. For some reason I have this huge urge to resist putting an XML lib in the kernel, but that maybe arcane tradition getting in my way. I'd consider most of the XML libraries out there works in progress, so if you're just looking to export data, then do you actually need a library to do so? Writing XML's pretty easy, it's parsing it in a sensible way that's a PITA and generally requires some kind of structured lib. I know little of GEOM, but will it reside in the kernel space or will this utility be userland? It strikes me as a presentation issue which is userland and something that could be punted to the ports or something that should be size insensitive. libxml is, IMHO, the best xml lib out there so if one had to be used, keeping it in the user space and the most feature rich would, to me, imply libxml: src/contrib/libxml (would be libxml2, not libxml). If you're exporting XML, XML alone doesn't do much good unless you've got some programmatic way of catching that data and doing something with it in the userspace. This seems like a big can-o-worms to me, but if you're going to do something, might as well do things in as correct/useful of a way as possible. -sc -- Sean Chittenden To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020915101012.GK85674>