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

2005-03-28 #1

Created by case. Last edited by case, 3 years and 114 days ago. Viewed 145 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
Quick Links
WhatIsThis about?
Midlets (mobile apps)
TimeLine
Charley a dog's life
MovieReview
Impressum
Project (internal)

Logged in Users: (2)
… and 9 Guests.

< July 2008 >
SunMonTueWedThuFriSat
12345
6789101112
13141516171819
20212223242526
2728293031

Icon-Snip more changes...

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

nearby  sites
link=http://www.mozilla.org/products/firefox/central.html
link=http://www.nutellausa.com/
link=http://snipsnap.org
link=http://www.amazon.de/exec/obidos/registry/wishlist/ref=cs_nav_top_2/028-7651535-0049343
RSS Feed RSS Feed
post to del.icio.us

Stats: 1174 snips by 16 users
created 5 years and 186 days ago

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



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

SEARCH