tags:

views:

262

answers:

2

can SAX parser handle self closing tag? or will it cause an error? eg <br/> or <hr/>

+1  A: 
<br/> or <hr/>

are called empty tags. SAX parser will not give an error.

adatapost
+1  A: 

If you're using the SAX parser in XML rather than HTML mode then yes, it can handle self-closing tags. Note: self-closing tags are valid XML but technically not valid HTML.

Valid HTML: <br> <div></div>

Valid XML: <br/> <div></div> <div/>

cletus
@cletus : what is ment my parser in html and xml mode. Can u giv me a link to basics and advanced SAX parser tutorials in java?