[Insight-developers] XML Library Stuff
Kent Williams
norman-k-williams at uiowa . edu
Thu, 3 Jul 2003 10:56:07 -0500
I'm working on a framework to support reading and writing XML-formatted d=
ata=20
files, pursuant to our agreement with the ITK consortium. I'll keep the
developers up to date on the design for this but I had a couple of prelim=
inary=20
questions.
As was mentioned in the Iowa MHCRC proposal, I'm looking at the Xerces-C=20
package to do XML parsing. Xerces-C implements Here are the assumptions I=
'm=20
operating under:
1. Xerces-C will be like VTK or FLTK, in that it will be a prerequisite f=
or=20
the stuff I'm doing in ITK, but built separately. Ditto for the Xalan-C=20
library (for XSL-based xml transformations).
2. The basic mechanism for reading/writing out datafiles will encapsulate=
the=20
SAX-based file parsing. It will define a templated base class; to write a=
n=20
XML-formatted data file reader/writer, you derive your own class from th=
is=20
base class and implement/override methods to suit the object you with to =
read=20
or write. The goal is to provide a mechanism for reading/writing XML fil=
es=20
that doesn't require much knowledge of XML, which is a giant subject with=
not=20
a lot of overlap with medical image processing.
3. I see no reason to entangle this mechanism with ITK so I propose to ad=
d it=20
in the Utilities framework, and avoid including ITK Headers. This will m=
ake=20
the whole Xerces-C dependency optional -- unless you really want to use=20
XML-formatted files, you don't need to deal with Xerces-C.
My questions are these:
1. I'd like to hear from others who are working on XML based stuff with I=
TK,=20
to make sure that whatever I do doesn't clash with what they're doing. I=
=20
seem to remember someone who was encapsulating ITK filters using XML to=20
describe them...
2. Is there another SAX-implementing library that anyone thinks is better=
to=20
use as a base for this work? My only objection to Xerces-C is that they=20
haven't written their makefiles to allow out-of-source builds.