This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes display a tag information from xslt file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "display a tag information from xslt file." Watch "display a tag information from xslt file." New topic

display a tag information from xslt file.

Chaitanya Kandikonda

Joined: May 12, 2006
Posts: 1
I have a doubt in displaying one tag information from XSLT using java program.



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,

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24189


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 ]

[Jess in Action][AskingGoodQuestions]
Have you checked out Aspose?
subject: display a tag information from xslt file.
It's not a secret anymore!