This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>To: address@hidden >From: Bear Giles <address@hidden> >Subject: XML support for ncdump(1) >Organization: . >Keywords: 199911300239.TAA25453 Hi Bear, > Attached are a few source files for ncxdump(1), a program that generates > a generic XML ("xCDL") instead of the standard CDL. I won't work on the > corresponding ncxgen(1) program until I get feedback on the XML format, > although I don't expect there to be a problem. > > In the long run, as everyone becomes comfortable with XML, both ncxgen(1) > and ncxdump(1) should be able to handle domain-specific DTDs, but that > will require a complete rewrite of both programs. OMF (Weather observation > markup format) is an example of this type of domain-specific XML which > might be tied to netCDF files. > > In any case, I've checked this DTD with 'nsgmls'. While it reports a > few errors, they don't appear to interfere with that application properly > parsing the file. > > Bear Giles > address@hidden Wow, thanks, that looks very useful. I'm forwarding your message to a few other users who indicated an interest in an XML version of netCDF data. I've made your sources and man page documentation available from: ftp://ftp.unidata.ucar.edu/pub/netcdf/contrib/xml.tar.gz (Probably the easiest way to build ncxdump is to just untar these into the ncdump source directory and build ncxdump from there with something like: c89 -c -O -I../libsrc varxdata.c c89 -c -O -I../libsrc ncxdump.c c89 -oncxdump -O ncxdump.o varxdata.o dumplib.o ../libsrc/libnetcdf.a ) I tried it out with the "-c" option on the output of the RUC model the way we decode it, and then made the resulting CDL and XML versions available at http://www.unidata.ucar.edu/staff/russ/bs/metadata/ruc.cdl http://www.unidata.ucar.edu/staff/russ/bs/metadata/ruc.xml for comparison. I like the XML, it's quite readable and not that much more verbose than the CDL. Thanks again for making this available. With an ncxgen as well, XML tools could easily be used with netCDF data. --Russ