• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XML parsing

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai,
we r using XML File for storing data , in the Tomcat server....
The structure of the file is like a database record with 4 column...
Before that we were using a db for holding this data..from that the records are selected using the following query " SELECT DISTINCT APPLICATIONNAME,CATAGORY FROM APPLICATION WHERE APPLICATIONID="?"
Now how can I get data in such fashion after parsing the XML File?
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use DOM or SAX or XSLT
See this link http://www.javaranch.com/gramps/XMLLinks.jsp for learning the above techniques/languages
[ December 04, 2003: Message edited by: Balaji Loganathan ]
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using SAX parser is easiest way to do this.
Parser will throw events at each opning/closing tag.
U will just have to catch those events to get the element.
J2EE tutorial
Go to chapter 5. Its a nice SAX tutorial..
hth
sumukh
 
reply
    Bookmark Topic Watch Topic
  • New Topic