Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting comment data in SAX ?

 
Celina Paul
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 ?
 
Alexandru Popescu
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic