Git Product home page Git Product logo

Comments (2)

BobSimons avatar BobSimons commented on June 11, 2024 1

You are correct, ERDDAP uses its own XML parser. That is partly why it doesn't support the tags you added. ERDDAP's XML parser is basically unchanged from when it was originally written, which was before many XML features (like the ones you used) were first defined.

When I wrote the XML parser (~2006), there were only two standard Java XML parsers (SAX and DOM?), both of which had massive limitations (either massive memory use or painful coding to use it). The approach of the ERDDAP parser solved these problems: it is fast, one pass, low memory usage, and easy to code with.

As with many things in ERDDAP, if one were starting from scratch now, one might do some things differently. There are libraries now that didn't exist then. Programmers do things differently now. Different things are in style. You could say:
"Modernize ERDDAP!", but it would be a ton of work and it always seemed more important to add new features to ERDDAP than to expend great effort to follow the latest trends and rewrite lots of code. As the netcdf-java project for the last 6+ years has shown, you can have multiple programmers work to modernize a library and sometimes all you get is lots of new bugs and no new features, and changes that broke every piece of software that used that library.

I'll leave it to Chris to decide if it is a good idea and the best use of his time to switch XML parsers. I think it isn't, partly because it would be a lot of work and partly because I'm not convinced this feature you want to add would be widely used. More important, it doesn't let administrators accomplish anything that they can't already do by using other tools to generate the datasets.xml chunks for datasets in a way that includes the repetitive (for your datasets) information. Eugene Burger/Kevin O'Brien/PMEL have long had an external tool they created for their group's use to generate datasets.xml chunks given the answers to a small questionnaire (which platform, which sensors, what ID, what date deployed, etc). I think other groups have done similar things. I think make-a-new-external-tool is a better approach as it is a relatively easy project and can be customized to your group's needs. Programmer time for ERDDAP is severely limited these days and I think other features (e.g., MQTT and OGC ERD API support) seem like better uses of Chris' time as they are aligned with ERDDAP's goals and connect ERDDAP to other realms in ways that were not possible before.

from erddap.

benjwadams avatar benjwadams commented on June 11, 2024

https://github.com/ERDDAP/erddap/blob/468e2b85d2c2484024f1418619f35bbe01b27a94/WEB-INF/classes/gov/noaa/pfel/coastwatch/util/SimpleXMLReader.java

Correct me if I'm wrong, but it looks like ERDDAP is rolling its own XML parser? Any reason for this versus using established Java libraries dedicated to this purpose?

from erddap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.