aspose file tools*
The moose likes Other Application Frameworks and the fly likes Loading Resources in XMl using Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Loading Resources in XMl using Spring" Watch "Loading Resources in XMl using Spring" New topic
Author

Loading Resources in XMl using Spring

Pradeep JD
Greenhorn

Joined: Oct 09, 2008
Posts: 6
I need to load a xml file containing the country names and their currency. Is it possible to load it by configuring in ApplicationContext.xml ? Please provide ma a psudo on how to load and access it in code.
Its much like loading a MAP in to the context and accessing it in code.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

<util roperties location="xxx"/>

???

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Pradeep JD
Greenhorn

Joined: Oct 09, 2008
Posts: 6
Thank you for your guidance.

I achieved it as given below

<bean id="applicationConstants" class="java.util.HashMap">
<constructor-arg>
<map>
<entry>
<key>
<value>India</value>
</key>
<value>INR</value>
</entry>
<entry>
<key>
<value>Japan</value>
</key>
<value>YEN</value>
</entry>
</map>
</constructor-arg>
</bean>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Loading Resources in XMl using Spring
 
Similar Threads
Error encountered for scala script
loading very large resultset in xml document
System.properties or new properties object for reading a .properties file?
Help me for xsd creation
Inner HTML not running JavaScript