Le 12/09/2011 21:13, Jeff Squyres a écrit :
> I had a thought about this issue this morning:
>
> 1. The XML export without libxml2 should be pretty easy (right?).

I didn't try it but yes it should.

> 2. If we're importing exactly what was exported, that should also be pretty 
> easy without libxml2 (right?).  Meaning: there can be a very simplistic 
> parser that only handles the expected ordering/cases/whatever that comes from 
> #1.

with whatever containing indentation and mixed spaces and tabulations at
least.

> 3. If the simplistic XML parser in #2 fails, it can fall back to libxml2's 
> importer for a "full" XML import (if libxml2 is available, of course).
>
> Or, you could reduce these two down to the following:
>
> 1. If libxml2 is present, use it for both export and import.
> 2. If libxml2 is not present, use a simplistic exporter and importer.  If the 
> simplistic XML importer fails, show a helpful message "Compile hwloc with 
> libxml2 for full XML import support," or something like that.

Fallback shouldn't be hard.

We just need to implement this parser now (and I won't do it anything
soon :))

Brice

Reply via email to