How XML is used on Server

In this article I have described that how XML application is used on server with the help of example.
  • 2057

XML Server

XML file can be save or store on the web server same as HTML file. Because it is plain text file as Html. XML can be generated on the server.  For generate on server its not require to any plug-in and not any software. XML can easily be stored and generated by a standard web server.


A simple XML file.

<?xml version="1.0" encoding="ISO-8859-1"?>
  <message>Hello how are you</message>

Store XML file on the web server with ASP. Net

response.Write("<?xml version='1.0' encoding='ISO-8859-1'?>")
response.Write("<message>Hello how are you</message>")

 We can also store XML file on the web server with XSLT style sheet

'Load XML file
set xml = Server.CreateObject("Test.XMLDOM")
xml.async = false

'Load XSL file
set xsl = Server.CreateObject("Test.XMLDOM")
xsl.async = false

'Transform XML file

In this Example

  • The first part of XML code creates an instance of the Test XML parser (XMLDOM), and loads the XML Document into memory.
  • The second part of XML code creates another instance of the parser and loads the XSL Document into memory.
  • The last part of XML code transforms the XML document using the XSL document and sends the result as XHTML to your browser.


Further Readings

You may also want to read these related articles :here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.