I understand that it is much easier to just use less tightly-typed data structures than classes for nmap output conversion .. I guess this comes down to several questions:
* What size is the code base you are working in?
* What is the purpose of the program you are creating?
If your code base is small and your program relatively small too, then using hashes is certainly quicker and easier .. if your program is larger, then in my opinion having more tightly typed classes makes maintaining and extending the program easier .. less chances for typos ...
You suggested seeing if there are any projects that will generate X language classes from XML .. great idea! The only thing that would then have to be done manually, and even then maybe not, would be documenting the classes :).
you know, there is a project,
that I have used for network diagrams and some UML diagrams .. I have seen a project that will take a class diagram and convert it to one of several languages .. I believe that python, PHP, and C++? were supported last time I looked ..
Maybe we could check into that and see about using it ..that would make multi-language support much easier and would also be cool in that the UML diagram describing the classes could be relied on to be 100% accurate!
Dia is really a great program.
Never used it for UML though.
If dia was able to open a xml file and display it as UML we could use dia2code to generate a typed parser. Right ?
True, I don't know if there is a script that will convert XML to a Dia diagram .. that would certainly be the easiest way to do things .. take the nmap DTD and generate a Dia diagram from it and then generate language-specific implementations from there ..
I think we would really need a DTD -> Dia converter .. as a single XML doc doesn't tell what the rules of the DTD are .. if we had a DTD -> Dia converter, then we could use the dia2code script to create class libraries.
We could have the pleasure of making this project obsolete :) ... in the commercial world that can be a 'bad' thing but not for a GPL project .. as we could then maybe focus on working on a challenging and interesting project that uses nmap within a high level language instead of just writing converter code :P.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.