File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Loading Resources in XMl using Spring

 
Pradeep JD
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<util roperties location="xxx"/>

???

Mark
 
Pradeep JD
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic