[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Using APR-util's expat

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-03-15 15:08:43 CET

Justin Erenkrantz <jerenkrantz@ebuilt.com> writes:

> On Thu, Mar 14, 2002 at 12:12:04PM -0800, Greg Stein wrote:
> > These bugs have all been fixed in recent versions of Expat (the expat-lite
> > directory is derived from Expat 1.1). The best thing that we could do would
> > be to use the Expat provided by or found by apr-util.
>
> I tried to take a look a few weeks ago as to what this would take,
> and it doesn't look pretty because APR-util's XML routines aren't
> exposing enough of the expat API to make the transition easy (i.e.
> no ability to substitute handlers). And, I'm not familiar enough
> with SVN's XML usage to be able to rip it all out and switch it to
> use APR-util's API.

libsvn_wc uses expat to read/write the 'entries' file, as well as
journaled log files. libsvn_delta uses expat to read/write our
xml-patch format. libsvn_ra_dav needs to read/write xml repsonses
over the network. (And mod_dav_svn is already using apr_xml.h instead
of expat.)

Hmmm, interesting. I just skimmed apr_xml.h, and indeed, it's a
different approach. Subversion defines expat callbacks that do
specific "work" for each tag as the parse is in progress. But the APR
method is to parse the whole document into memory, and then hand the
whole linked list of structures over to your program.

I guess this wouldn't be *such* a big change. I mean, we'd just need
to write a a single routine that walks a fully parsed XML-document
structure, and calls our existing callbacks!

Do you agree, Herr Stein?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 15 15:09:54 2002

This is an archived mail posted to the Subversion Dev mailing list.