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.
次のような XML ファイルがあるとします。
<?xml version='1.0' encoding='ISO-8859-1'?> <data> <tag1>Some information</tag1> <tag2/> </data>
タグの末尾だけを使用するのはよくあることですか (この場合はtag2)? これは、情報が保存されていないことを示していtag2ますか、それとも XML ファイルのエラーですか?
tag2
</tag2>先行する開始なしで、それ自体を持つこと<tag2>はエラーです。
</tag2>
<tag2>
空にすることもできますが、tag2次のように記述します。 <tag2 />
<tag2 />