• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP comment in XML syntax

 
reubin haz
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I met a question asking: does <%-- comment --%> have a corresponding XML syntax?

I thought it would be <!-- --> but the answer doesn't consider it as having XML syntax at all? Why isn't it?
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are tow types of comments -

<%-- comment --%>
<!-- comment -->

the purpose of both is to add a comment, but the subte differnce between the two is , the second comment is included in the response that is sent to the client. simply putting, when you as a client recieve a page on your browser, and when you right click on the page and say 'View Source' you are able to see only those comments which the developer wrote using the second syntax.

i wonder what relation has this with the XML syntax. you can read this

hth
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic