[Insight-developers] XML Library Stuff

Bill Hoffman bill . hoffman at kitware . com
Thu, 03 Jul 2003 12:18:23 -0400


We use expat in VTK/CableSwig/ParaView for XML parsing.   It is much smaller (a few c files)
than Xerces (large C++ framework).   Brad will post a follow up message after he gets back from lunch.
He has the most experience with XML parsers, and has a C++ wrapping around expat that
can be added to ITK.  If you have VTK, have a look at VTK/IO/vtkXMLParser.h for
an example.  The source for expat can be found in VTK as well:
/VTK/Utilities/expat


-Bill






At 11:56 AM 7/3/2003, Kent Williams wrote:
>I'm working on a framework to support reading and writing XML-formatted data 
>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 preliminary 
>questions.
>
>As was mentioned in the Iowa MHCRC proposal, I'm looking at the Xerces-C 
>package to do XML parsing. Xerces-C implements Here are the assumptions I'm 
>operating under:
>
>1. Xerces-C will be like VTK or FLTK, in that it will be a prerequisite for 
>the stuff I'm doing in ITK, but built separately.  Ditto for the Xalan-C 
>library (for XSL-based xml transformations).
>
>2. The basic mechanism for reading/writing out datafiles will encapsulate the 
>SAX-based file parsing. It will define a templated base class; to write an 
>XML-formatted data file reader/writer,  you derive your own class from this 
>base class and implement/override methods to suit the object you with to read 
>or write.  The goal is to provide a mechanism for reading/writing XML files 
>that doesn't require much knowledge of XML, which is a giant subject with not 
>a lot of overlap with medical image processing.
>
>3. I see no reason to entangle this mechanism with ITK so I propose to add it 
>in the Utilities framework, and avoid including ITK Headers.  This will make 
>the whole Xerces-C dependency optional -- unless you really want to use 
>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 ITK, 
>to make sure that whatever I do doesn't clash with what they're doing.  I 
>seem to remember someone who was encapsulating ITK filters using XML to 
>describe them...
>
>2. Is there another SAX-implementing library that anyone thinks is better to 
>use as a base for this work?  My only objection to Xerces-C is that they 
>haven't written their makefiles to allow out-of-source builds.
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers at itk . org
>http://www . itk . org/mailman/listinfo/insight-developers