Results 1 to 1 of 1
- 01-22-2012, 12:27 AM #1Member
- Join Date
- Jan 2012
- Rep Power
Using XML to govern application behavior
I'm not exactly new to java, but I'm new to actually doing things in depth (read 'Correctly') in java. I've been looking around at some the apps i have on my workstation and found some (Such as DBBVis) seem to use XML files to govern application behavior (such as detemrining which jpanel to show when a certain item is selected). These xml blobs include refernces to properties and methods that i assume are part of the class that is actually parsing the xml. My question is, what is going on there (example in code block)? Is there likely some library that is turning xml into code on the fly? Is the value of tags in the xml being used with introspection to execute methods? Where can i learn more about this?
Any pointers, refernce, etc are greatly appreciated.
extract from dbvis' database-mapping.xml:
<!--Cache --> <DatabaseMapping> <If test="#db.getDatabaseType().equals('cache')"> <Run expr="#me.setFacade('com.onseven.dbvis.db.cache.CacheFacade')"/> </If> </DatabaseMapping> <!--DB2--> <DatabaseMapping> <If test="#db.getDatabaseType().equals('db2')"> <Run expr="#me.setProfile('db2')"/> <Run expr="#me.setFacade('com.onseven.dbvis.db.db2.DB2Facade')"/> </If> </DatabaseMapping> <!--DB2 z/OS --> <DatabaseMapping> <If test="#db.getDatabaseType().equals('db2-zos')"> <Run expr="#me.setProfile('db2-zos')"/> <Run expr="#me.setFacade('com.onseven.dbvis.db.db2zos.DB2zOSFacade')"/> </If> </DatabaseMapping>
- By SiX in forum New To JavaReplies: 8Last Post: 09-10-2011, 07:44 PM
- By mjdousti in forum Advanced JavaReplies: 2Last Post: 08-24-2011, 08:41 PM
- By ace_quorthon in forum AWT / SwingReplies: 4Last Post: 01-31-2011, 07:18 PM
- By amro in forum New To JavaReplies: 10Last Post: 11-03-2010, 07:08 AM
- By flaquitqm in forum EclipseReplies: 1Last Post: 03-04-2010, 03:01 PM