|
XML Home
XML Tutorial About XML XML Viewers XML Editors XML Documents XML Syntax XML Elements XML Attributes XML with CSS XML with XSL XML Namespace XML Local Namespace XML Default Namespace XML Entities XML Creating Entities XML CDATA DTDDTD IntroductionDTD DOCTYPE DTD Internal DTD External DTD Combined DTD FPI DTD Elements DTD Element Operators DTD Attributes DTD Attribute Default Values DTD Attribute Types DTD General Entities DTD Parameter Entities DTD Embedded Images XSLTXSLT IntroductionXSLT Example XSLT Syntax XSLT <template> XSLT <apply-templates> XSLT <value-of> XSLT <for-each> XSLT <sort> XSLT <if> XSLT <choose> XPathXPath IntroductionXPath Location Path XPath Location Path - Absolute XPath Location Path - Relative XPath Attributes XPath Axis XPath Node Test XPath Predicate XPath Node Set XPath Comparison Operators XPath Boolean Operators XPath Number Operators XPath String Functions Tutorial Summary XHTML Tutorial AJAX Tutorial |
XML ViewersWhile you can view XML documents with a simple text editor, there are free XML viewers that present the contents in a more readable form. XML viewers interpret the document so it will display the XML document using any styles that have been applied using XSLT or CSS. It will also warn you if something doesn't look right, or if it doesn't validate correctly. Most modern browsers include XML support, so it's quite possible that your own browser is able to display the contents of XML files. You open an XML file in your browser the same way you open any other file in your browser. If it's a local file you can type the full path into the address bar. Otherwise, if it's available over the web, you can type the URL into the address bar. NotepadYou can use a text editor such as Notepad to create or view a simple XML file. Here's what this XML file looks like in Notepad:
FirefoxHere's how the above XML file appears in Firefox 2.0. Notice the difference between Notepad and Firefox. Firefox actually attempts to interpret the document. It even warns us if it thinks something could be out of place (such as a missing stylesheet).
Internet ExplorerHere's how the same XML file appears in Internet Explorer 6.0
Displaying ErrorsIf your XML document contains an error, your XML viewer should display a message indicating the error. In this file, I have purposely included an error. Below is how the error is reported in Internet Explorer.
Adding StylesOnce you start adding styles to your XML, you'll see a huge difference in how your XML documents appear with an XML viewer. We'll cover styles later. |
Need Website Content?
Get unique, quality digital content for your website.
|