Storing arbitrary type info in XML

Adam D. Ruppe destructionator at gmail.com
Tue May 8 12:01:20 PDT 2012


Here's one way you could do it:

http://arsdnet.net/dcode/xmlthing.d

You have to add the various classes to your
thing for it to build the reflection info.

That's the beginning of main() (bottom of
file).


I used the delegate map for the members
up top, which is a bit weird looking code
but is able to set anything at runtime,
which it uses to build the map.

I used my dom.d as the xml lib because I don't
know std.xml, but it shouldn't be too hard to
change over since it doesn't do anything fancy.

If you want my library though, it is in here:
https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff

dom.d and characterencodings.d


More information about the Digitalmars-d-learn mailing list