This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes how to read xml file like below Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "how to read xml file like below" Watch "how to read xml file like below" New topic
Author

how to read xml file like below

balaji pothula
Greenhorn

Joined: Nov 23, 2011
Posts: 3
<?xml version="1.0" encoding="utf-8"?>
<tv>
<programme start="20120608145500+0530" stop="20120608150000 +0530" channel="0980.DD1.in">
<title>KIRAN</title>
<date>20120608</date>
<category>DOCUMENTARY</category>
</programme>
<programme start="20120608150000 +0530" stop="20120608153000 +0530" channel="0980.DD1.in">
<title>KASHMAKASH ZINDAGI KI</title>
<date>20120608</date>
<category>TV SHOW</category>
</programme>
</tv>


In the above xml file i want to read start corresponding value 20120608145500 +0530, stop corresponding value 20120608150000 +0530 and channel corresponding value 0980.DD1.in
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
There are any number of XML APIs you could use: SAX, DOM, XPath, dom4j, XOM, JDOM, StAX... If you haven't used any API, try out a few to see which you like best.

I probably wouldn't start with SAX, though, it requires more code to be written than most of the other APIs. XPath might be a good fit if you want to extract a few specific, well-defined values out of a document.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to read xml file like below
 
Similar Threads
hey, can you guys help me with this hangman applet
Delete specific line
Cannot able to start the Admin Web console of Glassfish v3.1
Reading date from excel file
exception I got java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrec