O'Reilly logo

Effective XML: 50 Specific Ways to Improve Your XML by Elliotte Rusty Harold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Older Browsers

Some older browsers such as Netscape 3.0 and Internet Explorer 4.0 do have varying degrees of difficulty with XHTML constructs such as empty-element tags. For example, Netscape 3 places two horizontal lines when it sees <hr></hr> and none at all when it sees <hr/>. It is unwise to use the full panoply of XML syntax when serving XHTML to browsers. In particular, here are my suggestions.

  • Include at least one space before the /> in an empty-element tag.

  • Do not use CDATA sections.

  • Do not use processing instructions such as xml-stylesheet, especially in the document prolog.

  • Do not use character references such as &#x111; or &#968;.

  • Do not use entity references that were not available in HTML 1.0 such as &rdquo; and &tau;.

  • Do not include ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required