Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting comment data in SAX ?  RSS feed

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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've never won anything before. Not even a tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!