XML - SPLessons
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

XML Server

XML Server

shape Description

To make XML information accessible to a wide range of programs, we need to change the XML record on the SERVER and send it as unadulterated HTML to the BROWSER. That is another the excellence of XSL. One of the plan objectives for XSL was to make it conceivable to change information starting with one arrangement then onto the next on a server, returning coherent information to a wide range of future programs. XSL change on the server will undoubtedly be a noteworthy part of the Internet Information Server work undertakings later on.

XML Server

shape Description

A server pool is a group of one or more virtualization hosts with the same processor architecture that has access to the same virtual and physical networks, and storage resources. Server pools provide load balancing, high availability capabilities, and sharing of some resources for all members of the pool. Server pools are asset pools of virtualization has that share good chip design, which encourages activities, for example, moving visitors between hosts. You can likewise apply asset arrangements and approaches to them. The approaches that you set up for a server pool oversee large portions of the CPU usage and asset adjusting capacities. Operations to the server pool are assigned to the individual virtualization has in the server pool.

XML Files on the Server

shape Description

XML documents can be put away on an Internet server the very same route as HTML records. Begin Windows Notepad and compose the accompanying lines. Spare the document on the web server with an appropriate name like "splessons.xml". [xml]<?xml version="1.0" encoding="UTF-8"?> <note> <from>splessons</from> <to>web site</to> <message>Stop thinking start coding.</message> </note>[/xml]

Generating XML with PHP

shape Description

XML can be generated on a server without any installed XML software.To generate an XML response from the server using PHP, use following code. [xml]<?php header("Content-type: text/xml"); echo "<?xml version='1.0' encoding='UTF-8'?>"; echo "<note>"; echo "<from>Jani</from>"; echo "<to>Tove</to>"; echo "<message>Remember me this weekend</message>"; echo "</note>"; ?>[/xml]

Parsing PHP XML Document

PHP XML allows to create custom HTML tags. PHP SimpleXML module converts an XML document into an object that provides structured access to the XML. To create a SimpleXML object from an XML document stored in a string, pass the string to simplexml_load_string( ). It returns a SimpleXML object. [xml]<html> <body> <?php $note=<<<XML <note> <to>Tony</to> <from>Rita</from> <heading>Project submission</heading> <body>Please see clearly </body> </note> XML; $xml=simplexml_load_string($note); print_r($xml); ?> </body> </html>[/xml] Output: Now the result will be as follows. [xml] SimpleXMLElement Object ( [to] => Tony [from] => Rita [heading] => Project submission [body] => Please see clearly ) [/xml]

XML with ASP

shape Description

To produce a XML reaction from the server - basically compose the accompanying code and spare it as an ASP document on the web server. [xml]<% response.ContentType="text/xml" response.Write("<?xml version='1.0' encoding='UTF-8'?>") response.Write("<note>") response.Write("<from>Jani</from>") response.Write("<to>Tove</to>") response.Write("<message>Remember me this weekend</message>") response.Write("</note>") %>[/xml]

Transforming XML with XSLT on the Server

shape Description

This ASP changes a XML record to XHTML on the server as takes after. [xml]<% 'Load XML set xml = Server.CreateObject("Microsoft.XMLDOM") xml.async = false xml.load(Server.MapPath("simple.xml")) 'Load XSL set xsl = Server.CreateObject("Microsoft.XMLDOM") xsl.async = false xsl.load(Server.MapPath("simple.xsl")) 'Transform file Response.Write(xml.transformNode(xsl)) %>[/xml] In the above example, The principal piece of code makes an occurrence of the Microsoft XML parser (XMLDOM) and burdens the XML record into memory. The second piece of code makes another case of the parser and burdens the XSL record into memory. The last line of code changes the XML record utilizing the XSL archive and sends the outcome as XHTML to the program.

Summary

shape Key Points

  • XML can undoubtedly be put away and produced by a standard web server.
  • XML can be produced on a server with no introduced XML programming.