File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes XML validation and parsing using xslt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML validation and parsing using xslt" Watch "XML validation and parsing using xslt" New topic
Author

XML validation and parsing using xslt

Suja Mudunuri
Greenhorn

Joined: Jul 28, 2004
Posts: 14
Hello,
I am new to XML. I need to know how to validate an xml file using DTD and Transform the validated XML to another XML using XSLT
read the Transformed xml using a java file, using xml and ejb, display results in jsp.
Can any body help me please, I have to prepare for some important meeting and also should show how to do it. I read Sun J2ee book it talks about SAX parser I could not get much from it. Can any body give me a sample XML, DTD and slt. I need it ASAP.

Thak You.


Sujatha Mudunuri<br />SCJP 1.4<br />(Preparing SCWCD 1.4)
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Moving to XML and Related Technologies forum


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
A quick googling revealed plenty of nice tutorials. For example, this might be suitable for your needs. Sun's JAXP tutorial includes a nice chapter on XSL transformations.

Furthermore, you really should bookmark Elliotte Rusty Harold's Processing XML with Java and the Java Developer's Almanac.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I forgot one very useful resource: the vast amount of XML tutorials from IBM developerworks.

Oh, and you can turn on DTD validation by calling the setValidating(true) method on the factory you're using to create the parser instance (DocumentBuilderFactory if you're using DOM, SAXParserFactory if you're using SAX).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML validation and parsing using xslt