mind serializer and weblog
[ start | index | login ]
start > 2005-03-28 > 1

2005-03-28 #1

Created by case. Last edited by case, 4 years and 359 days ago. Viewed 258 times. #1
[edit] [rdf]
labels
attachments

XML steps with XStream

Against my latest blog entry I could not resist externalizing the configuration for the my remote control application. I used >>XStream, which enabled me to just dump the current configuration to a file and so easily constructed the necessary XML formats.

I am pretty sure, I will use that toolset at work, too!

Reading the XML into the object again is that simple:

XStream xstream = new XStream(new DomDriver());
xstream.alias("appInteraction", GenericInteraction.class);
xstream.alias("keyAction", KeyAction.class);
xstream.alias("AppControlConfig", AppControlConfig.class);

FileReader fr = new FileReader(CONFIG_FILE_NAME); configuration = (AppControlConfig) xstream.fromXML(fr); ...

no comments | post comment
Motto
Communication is key

quick Quick Links
WhatIsThis about?
mobile Sudoku
mobile Kakuro
more mobile apps...
PostTrack (a desktop app)
TimeLine
Impressum
Charley - suzie's dog

Logged in Users: (0)
… and a Guest.

Icon-Snip more changes...

Twitter updates

Twitter Updates

    more updates...

    Blogs
    >>Polskie Wyzwania
    >>++ vox.machina ++
    >>Zitate - Sprüche - Aphorismen
    >>Wil Wheaton
    >>Mathematische Kleinigkeiten
    >>William Gibson
    >>instant-thinking
    >>Over heard in NY

    RSS Feed RSS Feed
    post to del.icio.us

    Stats: 1217 snips by 16 users
    take-off 7 years and 66 days ago

    Powered by
    >>SnipSnap 1.0b2-uttoxeter
    with SnipScale 1.1.0



    This work is licensed under a
    >>Creative Commons License.

    SEARCH