3 ms·
Introducing whitespace in most xml document formats changes the meaning.
by the_mitsuhiko 9y ago
Introducing whitespace in most xml document formats changes the meaning.
- cjsuk 9y agoNo it doesn’t.
- majewsky 9y agoYou're both sort of correct. 1 and 2 below are equivalent (afaik), but 1 and 3 most certainly are not. 1: <x>an </x> 2: <x> an</x> 3: <x>a n</x>
- cjsuk 9y agoIt depends on your space settings in the DTD/schema/element. You can be explicit but very few people realise that.
- oever 9y agoIndeed. To indent properly you need to know the schema. The schema tells you to which element you may add or remove white-space.
- the_mitsuhiko 9y agoThat’s why I said most and not all. I did XML long enough to know both schemas and that their support is bad.
- deleted 9y ago[deleted]