Tags and White Space
Inside tags the white space story is quite different. These three shape elements are the same for all intents and purposes.
<shape>star</shape> <shape >star</shape> <shape >star</shape>
Parsers will not distinguish one from the other, and your code should not depend on the difference.
Similarly, white space in a document's prolog, epilog, and DTD is not considered. For example, these three documents are essentially the same.
<?xml version="1.0"?> <?xml-stylesheet type="text/css" href="root.css"?> <!DOCTYPE root SYSTEM "data.dtd"> <root> contents </root> ____________________________________________________________ <?xml version="1.0"?> <?xml-stylesheet type="text/css" href="root.css"?> <!DOCTYPE root SYSTEM "data.dtd"> ...
Get Effective XML: 50 Specific Ways to Improve Your XML now with O’Reilly online learning.
O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.