Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PLEASE GIVE ME THE CODE TO PARSE CONFIGURATION XML FILE (BELOW)URGENT,HELP ME.......

 
Sreekanth T.K
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PLEASE GIVE ME THE JAVA CODE FOR THIS:-

I have a configuration xml file , where i want to keep the
news provider details such as url, name, interval etc.
Read that configuration file and then get the url and other
information and then do the RSS parsing for the urls you get from the
config file...
<config>
<provider>
<name>Times of india</name>
<category>India</category>
<url>http://timesofindia.indiatimes.com/rssfeeds/-2128936835.cms</url>
<interval>30</interval>
</provider>
<provider>
<name>Times of india</name>
<category>International Business</category>
<url>http://timesofindia.indiatimes.com/rssfeeds/-2128680634.cms</url>
<interval>30</interval>
</provider>
<provider>
<name>CNN</name>
<category>world news</category>
<url>http://rss.cnn.com/rss/cnn_world.rss</url>
<interval>30</interval>
</provider>
 
Himanshu Bisht
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use SAX,DOM or JDOM to parse your XML and then use the values accordingly.
Try google for examples.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And read http://faq.javaranch.com/view?HowToAskQuestionsOnJavaRanch

Moving to our XML forum...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic