There should be a system for supporting particular XML and JSON formats by schema. This would be similar to use file extension to imply type, but instead of .bin implying the BinaryDataSource should be used, an XML schema with xmlns="http://pds.nasa.gov/pds4/pds/v1" would imply that a special source managing PDS4 files can be used. Presently you must use an explicit vap+pds4:.. prefix to assert the typeness of the XML file, when the typeness is asserted right at the top of the XML file.
This would be a registry of schema xmlns to internal type. The schema name is somewhat volatile, and a table of names should be kept since multiple schema references might be handled by the same Autoplot data source. (https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1C00.xsd and https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1D00.xsd could both be handled by the PDS4 support.) (These is a mash of URL references and I need to better understand what all these mean, see https://space.physics.uiowa.edu/voyager/data/voyager-1-pws-sa/data/1988/vg1pws_lr_19880105_v5.10.xml)
JSON also supports schemas, and examples of this should be identified and supported as well. An example of this are the tfcat files Baptiste and Corentin are using could be tests for this, though I don't know that they assert a schema, but they could. (See https://maser.obspm.fr/doi/10.25935/nhb2-wy29/content/juno_waves_lesia_tfcat_2017.json for an example.)
Last I'm sure there will be JSON and XML types we want to support even though they don't assert a schema, and "duck typing" should be supported. For these, there should be an automatic schema detection, looking at tags to be sufficiently confident the XML or JSON file is-a particular type.
See https://sourceforge.net/p/autoplot/feature-requests/721/ which is generic support of JSON and XML using XPath.
Here's an action shot. Note there's no prefix for the JSON file.
I need to be careful to make sure that the automatic type doesn't override a declared type. For example, there will be an xpath-based JSON reader which might be used to develop tfcat files, but the automatic tfcat reader keeps triggering.
See https://sourceforge.net/p/autoplot/bugs/2417/ where aggregation didn't properly look up the type of the thing it was aggregating.
See https://sourceforge.net/p/autoplot/feature-requests/729/ support PDS4.