Using XML and stylesheetsThe style sheets for XML are called the XSL. An XSL is used to display the xml data in a format that is defined by the user in the xsl file. XSL uses Xpath to navigate through the xml document. In an xsl document, the <xsl:stylesheet> or the <xsl:transform> element is used as the root element. You can use either of these tags as the root element since both of them are the same. In this tag you have to include the version attribute and the XSLT namespace in this element. For example a complete tag will look like, <xsl:stylesheet version="1.0" The next step is to create an xsl:template element within which you will using other xsl elements like xsl:for-each and xsl:value-of to loop through the elements of the xml file and display the content of the nodes. You can embed the style sheet in the xml file itself so that when a user opens the xml file the content is displayed according to the formatting information found in the xsl file.
|
|
||
|
|||
“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”
Copyright - © 2004 - 2019 - All Rights Reserved.