DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Displaying XML With XSL

10.06.2005
| 1023 views |
  • submit to reddit
        Put this at the top of your XML:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="my-xsl.xsl"?>

Or this:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="my-xsl.xsl"?>

Depending of your file encoding.