Transforming XML documents using XSLTTransforming XML documents using XSLT can be done in many ways. Whatever be the method to transform an XML document you have to create an XSL file for the transformation. Using tools meant for that purpose will speed up your development process. Once you have our XSL in place, you can write the code to do the transformation. In ASP.Net you have System.Xml, System.Xml.Xsl, and System.Xml.Xpath for this purpose. You can use the classes available in these namespaces to do the transformation. You can create an XslTransform object and use the Load method of that object to load the XSL document into it. Then use the Transform method available to do the transformation of the source XML file to the resulting document. To do a simple transformation, you can even include the XSL file in the XML document itself by using the "xml-stylesheet" tag which takes the XSL file as one of the values of the attributes. Once you set it you can simple open the XML file to see the transformation done by the browser itself.
|
|
|||
|
||||
“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”
Copyright - © 2004 - 2019 - All Rights Reserved.