Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SAXパーサーは自己終了タグを処理できますか? それともエラーになりますか?例えば<br/> or <hr/>
<br/> or <hr/>
空タグと呼ばれます。SAX パーサーはエラーを出しません。
HTML モードではなく XML で SAX パーサーを使用している場合は、はい、自己終了タグを処理できます。注:自己終了タグは有効な XML ですが、技術的に有効な HTML ではありません。
有効な HTML: <br> <div></div>
<br> <div></div>
有効な XML: <br/> <div></div> <div/>
<br/> <div></div> <div/>