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"> <root>   contents </root> ____________________________________________________________ <?xml version="1.0"?><?xml-stylesheet type="text/css"                                       href="root.css"?><!DOCTYPE  root SYSTEM "data.dtd"> <root>   contents </root> 


Effective XML. 50 Specific Ways to Improve Your XML
Effective XML: 50 Specific Ways to Improve Your XML
ISBN: 0321150406
EAN: 2147483647
Year: 2002
Pages: 144

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net