This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

how to read a simple xml file using spring

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have simple xml file. how to read this simple xml file ?

what are the step needs to be done in web.xml file to read this file using spring framework.

the structure of the xml file is

<inboxConfig>
<inbox>
<url>TEST1:6001</url>
<name>test</name>
</inbox>
<inbox>
<url>test2:5580</url>
<name>test2</name>
</inbox>
<inbox>
<url>test3:5590</url>
<name>test3</name>
</inbox>
</inboxConfig>


the requirement is i want to read url and name from my java class.

can anyone have any idea how to resolve this issue ?

it would be greateful if someone guide me how to read this xml file.

Thanks
Saravana
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am also new to spring but this advice might work.

Use this :

BeanFactory factory = new XmlBeanFactory(new FileInputStream("yourxml.xml"));

Now check if factory object had soe method and which i am sure that it will be having to resolve your issue. I am sorry if i did something wrong as i told you i am also just like you !! NEW !!.

Regards,
 
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!