File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
XML and Related Technologies
Getting comment data in SAX ?
Joined: Nov 01, 2003
Jul 15, 2004 17:55:00
I had posted this question earlier in XML group, never got an answer.
In DOM, there is a COMMENT_NODE to get the comment data, but if I have to get the data in a comment node in SAX, what can I do?
When the parser comes across a comment node, there is no callback method defined for this in SAX.
Is there a way to get that data in SAX ?
Joined: Jul 12, 2004
Jul 16, 2004 03:37:00
AFAIK in SAX 1.0 there is no way to retrieve the XML comments, as SAX assumes that comments are there for the author's benefit, not for the reader's.
I don't know if this is fixed in SAX 2.0.
I agree. Here's the link:
subject: Getting comment data in SAX ?
Help regarding XML Parsing
Getting comment data using SAX....
how to create DOM structure from SAX parser
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014