Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Introducing whitespace in most xml document formats changes the meaning.


No it doesn’t.


You'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>


It depends on your space settings in the DTD/schema/element. You can be explicit but very few people realise that.


Indeed. To indent properly you need to know the schema. The schema tells you to which element you may add or remove white-space.


That’s why I said most and not all. I did XML long enough to know both schemas and that their support is bad.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: