• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

reading from XML

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.,
Could you please tell me,How can I read values from an XML?.Supppose,I have my own xml file (student.xml) that contains the tag as follows,
<student>
<name>kathy</name>
<subject>java</subject>
</student>
And I need to read name,subject values from the servlet or jsp.
thanks in advance
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are quite a few ways to parse XML in your app and each has it's pros and cons. Take a look here:http://www.cafeconleche.org/books/xmljava/. It's the complete book online, I'm sure you'll find something that suits your requirements.
[ September 24, 2007: Message edited by: Tarun Yadav ]
 
Ranch Hand
Posts: 1162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well one way is to make them like init parameters or something. There si also a class that allows you to read XMl values and a method something like parseWebXML(). look up the method and class. I wish I could help more But Im busy so I can help you out later
[ September 24, 2007: Message edited by: Chunnard Singh ]
 
suresh sai
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks tarun and chunnard.
 
reply
    Bookmark Topic Watch Topic
  • New Topic