-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libxml2 capability #2139
libxml2 capability #2139
Conversation
re: Unidata#2119 H/T to [Egbert Eich](https://github.com/e4t) and [Bas Couwenberg](https://github.com/sebastic) for this PR. It is undesirable to make netcdf be dependent on the availability of libxml2, but it is desirable to allow its use if available. In order to do this, a wrapper API (include/ncxml.h) was constructed that supports either ezxml or libxml2 as the implementation. Additionally, the xml support code was moved to a new directory netcdf-c/libncxml. Primary changes: * Create a new sub-directory named netcdf-c/libncxml to hold all the xml implementation code. * Move ezxml.c and ezxml.h to libncxml * Create a wrapper API -- include/ncxml.h * Create an implementation, ncxml_ezxml.c to support use of ezxml. * Create an implementation, ncxml_xml2.c to support use of libxml2. * Add a check for libxml2 in configure.ac and CMakeLists.txt * Modify libdap to use the wrapper API instead of ezxml directly. Misc. Other Changes: * Change include/netcdf_json.h from built source to be part of the distribution.
Encountering an error on OSX where a couple of additional "legacy" includes need to be included in addition to |
If you make changes to ezxml.c, see if those changes can be codified |
@DennisHeimbigner Will do, thanks! |
I wonder how relevant this still is today: The 'upstream' tarball has last been updated in June 2006. Meanwhile, the code here has picked up a number of security patches. While the upstream project is seeing a surprising number of downloads, nobody seems to feel inclined to pick it up. |
I noticed that the amazon s3 sdk uses tinyxml, so I am going to infestigate that as a replacement. |
re: PR Unidata#2139 re: PR Unidata#2169 re: PR Unidata#2146 re: Issue Unidata#2119 Found the product tinyxml2 at https://github.com/leethomason/tinyxml2.git and replaced ezxml with it. Tinyxml2 is about twice the LOC of ezxml, but at least is it still being maintained, and I can use it out of the box. It is C++ rather than C, but we seem to have reached the point that we can include C++ code with only minor compile flag changes. Untested on Mac OS. Added instructions to the end of libncxml/Makefile.am on how to upgrade to a later version of tinyxml2. This PR obsoletes the use of ezxml (re PRs Unidata#2146 and https://github.com/Unidata/netcdf-c/issue/2119).
This PR contains #2135 plus fenceposting options for
cmake
andconfigure
,-DENABLE_LIBXML2
or--enable/disable-libxml2
.