Reputation: 10961
Say I have some XML that contains a tag that looks like this:
<tag_name> Content </tag_name>
Or this:
<tag_name>
Content
</tag_name>
Should the whitespace on either end of the text content of the tag be considered part of the content? I don't see this explicitly addressed in the XML spec, but the Text Encoding Initiative seems to say it should be collapsed.
Upvotes: 1
Views: 54
Reputation: 8058
XML itself considers the whitespace to be part of the content.
Whether your particular XML-based language does is up to you. If not, then it will be the responsibility of applications which process that language to strip off the whitespace.
Upvotes: 2