Help coderanch get a
new server
by contributing to the fundraiser
  • 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

display a tag information from xslt file.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I have a doubt in displaying one tag information from XSLT using java program.

example:

student.xslt

Student id: John
Student Name: Visa
Department: 111-222-333
Year: 05/2008

suppose i want to display only student name. into command prompt. How do i write a program using xslt.
Please guide me in this regards,

Chaitanya
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

The data you've shown here isn't XSLT or XML, so I'm a little confused as to what your question is. Running a valid XSLT transform on an XML file from Java can be as simple as this:



If you had XML that looked like

Then XSL to extract just the name might look like


Hope something in here helps.
[ May 23, 2008: Message edited by: Ernest Friedman-Hill ]
 
it's a teeny, tiny, wafer thin ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic