Re: [pcgen-xml] Java & XML serialization sample
- Keith Davies wrote on Thu Mar 14 16:19:24 2002:
gotten anything done since Friday (not that I'm stuck, I've just been
In the directory above, you'll find a ZIP file containing the source
I've got so far. Unzip it into a directory on your CLASSPATH; I've
got a directory org/pcgen/PCGen that has all the source. I haven't
sorted out ant yet on my machine (or at all, really), so I've included
the compiled class files to make things simpler.
to give it a try, make sure the directory the ZIP file was unpacked in
is part of CLASSPATH, then cd to org/pcgen/PCGen/test and do
This will cause sample.xml to be loaded and (a subset of) the
information parsed out and dumped to stdout.
data/ Classes that contain decoded information
loader/ Loader interface. Can be implemented to load current LST
files -- with a lot of work, I think, because certain
information would have to be parsed out.
test/ classes for testing
xml/ Main classes for loading and parsing XML files
xml/element/ Classes for handling element data as it's read; these
apply attributes and subelements as needed for the data
The data classes have no knowledge whatsoever of XML, nor does the
primary data class (PCGenData -- I want a better name for this; I'm
thinking of DataStore). The loader and related classes (ArmorElement,
etc) use the data classes, not the other way around. This provides
greatest flexibility for adding new loaders and storing the data in
No documentation in the source yet, nor design document. It seems to
work reasonably well, though.
Oh yeah -- you'll need Xerces to get it to run, as written.
Evil High Priest: "Leave now, if you value your skins."
Garrick: "I'm all for it."