Version 9 of Interfacing with XML

Updated 2002-10-29 17:40:12

We have several tools to deal with XML: TclXML, tDOM... which serve the same purpose with different interfaces. It might be a good idea to unify those under a single Tcl interface, so one can plug in different implementations (including the gnome XML libraries...)


Please explain why this is necessary? I think in general development, people pick the tool they like the best and stick with it. So what advantage would I have if I used a single interface? I always wondered about this same problem with SQL interfaces. The example I can think of is the ns_db command in AOLserver. Yes its great. However it only provides a basic interface to SQL databases. Look at the Oracle driver. They had to create a separate command to implement things such as binding. Is it possible that a single XML interface could be susceptible to the same problems? And what advantages would I gain by plugging in different XML libraries?

JAC

Well, I for one would find it useful. I have occassional interest in writing generic code (such as StarSite) where I would like to plug in XML processing capabilities. However, I don't want to limit developers using my code to my favourite XML processor. With a universal API, anyone could plug in their processor of choice. Sometimes, I like tDOM because of its speed and efficiency, and its excellent XPath capabilities, but others I long for TclXMLs pure-Tcl version, so I don't have portability problems on platforms that I don't have a compiled tDOM for.

NEM.

But either way you are forcing something on the user. Either a specific XML processor or a specific API. I do suppose there is a small advantage to being able to plug in any XML processor should someone need to increase speed or run on a platform that is lacking a binary for a given XML processor.

JAC