Thursday, November 12, 2009

Creating the Property File













Creating the Property File

The online music store application uses a property file that stores the path to the XML files of the application. The following code shows the path.properties property file of the application:




userlistpath=c:/Chp2/code/xml/userlist.xml
musicalbumlistpath=c:/Chp2/code /xml/musicalbumlist.xml
videoalbumlistpath=c:/Chp2/code /xml/videoalbumlist.xml
musicpurchaselistpath=c:/Chp2/code /xml/musicpurchaselist.xml
videopurchaselistpath=c:/Chp2/code /xml/videopurchaselist.xml


The above code contains the following properties:




  • userlistpath: Specifies the path to the userlist.xml file.




  • musicalbumlistpath: Specifies the path to the musicalbumlist.xml file.




  • videoalbumlistpath: Specifies the path to the videoalbumlist.xml file.




  • musicpurchaselistpath: Specifies the path to the musicpurchaselist.xml file.




  • videopurchaselistpath: Specifies the path to the videopurchaselist.xml file.








Note�

You need to change the values of the above properties in the path.properties file to the directory that stores the XML files of the application.












No comments: