XML & Web services: Apache Xerces SAX parser and XSL
- Posted by: A JP
- Posted on: September 05 2002 14:25 EDT
Iam using Apache Xerces for parsing XML document. Iam new to XML, so got couple of questions.
1. In DOM, Iam able to access a particular element (tag) and get the value using getNodeValue() method. How to do the same, that is go to a particular element and get the value in SAX parser. Does the SAX API provide any method for it. If not then how should it be done. Any sample code (for accessing element value) or web site having sample code is appreciated.
2. Iam also trying to learn XSL. For having XSL work, do I need to use XSLT processor like xalan. Without any processor, can I run XSL. My understanding of XSL for XML is, like CSS for HTML. For using CSS for HTML, I don't need any processor. Similarly, will XSL work without any. It would be great if you let me know about the functionality of xalan in XML.
public void characters(char text, int start, int length)
method of ContentHandler interface
extend DefaultHandler and override the above method
A2)IE has built in XSL Engine, so you can do without xalan.
for more info on xalan, have a look at