<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5987566117853352799</id><updated>2012-02-08T01:53:50.141-08:00</updated><category term='SOAP'/><category term='XMPP'/><category term='Performance Tips'/><category term='JAX-WS'/><category term='XML/XSLT'/><category term='JAX-RPC'/><category term='Web Service'/><category term='Java Script'/><category term='Chatting'/><title type='text'>Finally I got it...</title><subtitle type='html'>We used to search many sites ang google internet for our techie problems. I really feal very happy if i finish my search by finding my solution at same place where i started searching... ;) 
I'm Feeling Lucky... You will Feel Lucky...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://finallyigotit.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5987566117853352799/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://finallyigotit.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Vamshi Rapolu</name><uri>http://www.blogger.com/profile/08939811862831628563</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5987566117853352799.post-6035651344239739960</id><published>2009-05-06T07:04:00.000-07:00</published><updated>2010-12-05T20:07:48.729-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOAP'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Service'/><category scheme='http://www.blogger.com/atom/ns#' term='JAX-WS'/><category scheme='http://www.blogger.com/atom/ns#' term='JAX-RPC'/><title type='text'>JAX-RPC vs JAX-WS</title><content type='html'>Java API for XML-Based RPC (JAX-RPC) is a Legacy Web Services Java API, it uses SOAP and HTTP to do RPCs over the network and enables building of Web services and Web applications based on the SOAP 1.1 specification, Java SE 1.4 or lower, or when rpc/encoded style must be used.&lt;br /&gt;&lt;br /&gt;You can use the JAX-RPC programming model to develop SOAP-based web service clients and endpoints. JAX-RPC enables clients to invoke web services developed across heterogeneous platforms. Likewise, JAX-RPC web service endpoints can be invoked by heterogeneous clients. JAX-RPC requires SOAP and WSDL standards for this cross-platform interoperability.&lt;br /&gt;&lt;br /&gt;JAX-RPC lets people develop a web service endpoint using either a Servlet or Enterprise JavaBeans (EJB) component model. The endpoint is then deployed on either the Web or EJB container, based on the corresponding component model. Endpoints are described using a Web Services Description Language (WSDL) document.(This WSDL document can be published in a public or private registry, though this is not required). A client then uses this WSDL document and invokes the web service endpoint.&lt;br /&gt;&lt;br /&gt;JAX-RPC in J2ee 1.4 supports 4 types of stubs and invocations: static stub, dynamic proxy, Dynamic Invocation Interface (DII) and Application client.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Static Stub Client&lt;/span&gt;&lt;br /&gt;Web service client makes a call through a stub, a local object that acts as a proxy for the remote service. Because the stub is created by wscompile at development time (as opposed to runtime), it is usually called a static stub.&lt;br /&gt;&lt;br /&gt;Example: Invoking a Stub Client&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;Stub stub = (Stub) (new MyHelloService_Impl().getHelloIFPort());&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;stub._setProperty (javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,endpoint_address_string);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;HelloIF hello = (HelloIF)stub;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;System.out.println(hello.sayHello("Duke!"));&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Dynamic Proxy Client&lt;/span&gt;&lt;br /&gt;In contrast, the client call a remote procedure through a dynamic proxy, a class that is created during runtime. Although the source code for the static stub client relies on an implementation-specific class, the code for the dynamic proxy client does not have this limitation.&lt;br /&gt;&lt;br /&gt;Example: Dynamic Proxy&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;javax.xml.rpc.Service service = ServiceFactory.newInstance().createService(...);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;com.example.StockQuoteProvider sqp = (com.example.StockQuoteProvider)service.getPort(portName, StockQuoteProvider.class);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;float price = sqp.getLastTradePrice("ACME");&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Dynamic Invocation Interface Client&lt;/span&gt;&lt;br /&gt;With the dynamic invocation interface (DII), a client can call a remote procedure even if the signature of the remote procedure or the name of the service is unknown until runtime. In contrast to a static stub or dynamic proxy client, a DII client does not require runtime classes generated by wscompile.&lt;br /&gt;&lt;br /&gt;Example: Dynamic Invocation Interface&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-family: courier new;"&gt;javax.xml.rpc.Service service = ServiceFactory.newInstance().createService(...);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;javax.xml.rpc.Call call = service.createCall(portName, "getLastTradePrice");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;// This example assumes that addParameter and setReturnType methods are not required to be called&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Object[] inParams = new Object[] {"ACME"};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Float quotePrice = (Float)call.invoke(inParams);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Application Client&lt;/span&gt;&lt;br /&gt;Unlike the stand-alone clients, for an application client, because it's a J2EE component, an application client can locate a local web service by invoking the JNDI lookup method.&lt;br /&gt;&lt;br /&gt;Example: Application Client&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;Context ic = new InitialContext();&lt;br /&gt;MyHelloService myHelloService = (MyHelloService)&lt;br /&gt;ic.lookup("java:comp/env/service/MyJAXRPCHello");&lt;br /&gt;appclient.HelloIF helloPort = myHelloService.getHelloIFPort();&lt;br /&gt;((Stub)helloPort)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,args[0]);&lt;br /&gt;System.out.println(helloPort.sayHello("Jake!"));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Service Endpoint Model&lt;/span&gt;&lt;br /&gt;JAX-RPC supports a client model for the service consumer, and a service endpoint model for the service producer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Application-Level Interaction Modes&lt;/span&gt;&lt;br /&gt;JAX-RPC specifies three client application interaction models:&lt;br /&gt;* Synchronous request-response two-way RPC&lt;br /&gt;* Asynchronous (non-blocking) request-response two-way RPC&lt;br /&gt;* One-way RPC&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 130%; font-weight: bold;"&gt;JAX-WS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;JAX-WS 2.0 is the successor of JAX-RPC 1.1 - the Java API for XML-based Web services. If possible, JAX-WS should be used instead as it is based on the most recent industry standards.&lt;br /&gt;&lt;br /&gt;What remains the same?&lt;br /&gt;&lt;br /&gt;Before we itemize the differences between JAX-RPC 1.1 and JAX-WS 2.0, we should first discuss what is the same.&lt;br /&gt;&lt;br /&gt;* JAX-WS still supports SOAP 1.1 over HTTP 1.1, so interoperability will not be affected. The same messages can still flow across the wire.&lt;br /&gt;&lt;br /&gt;* JAX-WS still supports WSDL 1.1, so what you've learned about that specification is still useful. A WSDL 2.0 specification is nearing completion, but it was still in the works at the time that JAX-WS 2.0 was finalized.&lt;br /&gt;&lt;br /&gt;What is different?&lt;br /&gt;&lt;br /&gt;* SOAP 1.2&lt;br /&gt;JAX-RPC and JAX-WS support SOAP 1.1. JAX-WS also supports SOAP 1.2.&lt;br /&gt;&lt;br /&gt;* XML/HTTP&lt;br /&gt;The WSDL 1.1 specification defined an HTTP binding, which is a means by which you can send XML messages over HTTP without SOAP. JAX-RPC ignored the HTTP binding. JAX-WS adds support for it.&lt;br /&gt;&lt;br /&gt;* WS-I's Basic Profiles&lt;br /&gt;JAX-RPC supports WS-I's Basic Profile (BP) version 1.0. JAX-WS supports BP 1.1. (WS-I is the Web services interoperability organization.)&lt;br /&gt;&lt;br /&gt;* New Java features&lt;br /&gt;o JAX-RPC maps to Java 1.4. JAX-WS maps to Java 5.0. JAX-WS relies on many of the features new in Java 5.0.&lt;br /&gt;o Java EE 5, the successor to J2EE 1.4, adds support for JAX-WS, but it also retains support for JAX-RPC, which could be confusing to today's Web services novices.&lt;br /&gt;&lt;br /&gt;* The data mapping model&lt;br /&gt;o JAX-RPC has its own data mapping model, which covers about 90 percent of all schema types. Those that it does not cover are mapped to javax.xml.soap.SOAPElement.&lt;br /&gt;o JAX-WS's data mapping model is JAXB. JAXB promises mappings for all XML schemas.&lt;br /&gt;&lt;br /&gt;* The interface mapping model&lt;br /&gt;JAX-WS's basic interface mapping model is not extensively different from JAX-RPC's; however:&lt;br /&gt;o JAX-WS's model makes use of new Java 5.0 features.&lt;br /&gt;o JAX-WS's model introduces asynchronous functionality.&lt;br /&gt;&lt;br /&gt;* The dynamic programming model&lt;br /&gt;o JAX-WS's dynamic client model is quite different from JAX-RPC's. Many of the changes acknowledge industry needs:&lt;br /&gt;+ It introduces message-oriented functionality.&lt;br /&gt;+ It introduces dynamic asynchronous functionality.&lt;br /&gt;o JAX-WS also adds a dynamic server model, which JAX-RPC does not have.&lt;br /&gt;&lt;br /&gt;* MTOM (Message Transmission Optimization Mechanism)&lt;br /&gt;JAX-WS, via JAXB, adds support for MTOM, the new attachment specification. Microsoft never bought into the SOAP with Attachments specification; but it appears that everyone supports MTOM, so attachment interoperability should become a reality.&lt;br /&gt;&lt;br /&gt;* The handler model&lt;br /&gt;o The handler model has changed quite a bit from JAX-RPC to JAX-WS.&lt;br /&gt;o JAX-RPC handlers rely on SAAJ 1.2. JAX-WS handlers rely on the new SAAJ 1.3 specification.&lt;br /&gt;&lt;br /&gt;Reference Origination Link: http://www.ibm.com/developerworks/webservices/library/ws-tip-jaxwsrpc.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5987566117853352799-6035651344239739960?l=finallyigotit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://finallyigotit.blogspot.com/feeds/6035651344239739960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://finallyigotit.blogspot.com/2009/05/jax-rpc-vs-jax-ws.html#comment-form' title='26 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5987566117853352799/posts/default/6035651344239739960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5987566117853352799/posts/default/6035651344239739960'/><link rel='alternate' type='text/html' href='http://finallyigotit.blogspot.com/2009/05/jax-rpc-vs-jax-ws.html' title='JAX-RPC vs JAX-WS'/><author><name>Vamshi Rapolu</name><uri>http://www.blogger.com/profile/08939811862831628563</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>26</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5987566117853352799.post-6120174192061416107</id><published>2009-05-01T10:38:00.000-07:00</published><updated>2009-05-06T02:02:02.921-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Chatting'/><category scheme='http://www.blogger.com/atom/ns#' term='Java Script'/><category scheme='http://www.blogger.com/atom/ns#' term='XMPP'/><title type='text'>Web-based Chating using Java Script and XMPP like gtalk</title><content type='html'>Every body will be familiar with gtalk chatting in web browser. This blog will give you a brief idea of how to implement the same with open source proven solutions.&lt;br /&gt;&lt;br /&gt;Google, yahoo or any chatting provider will use the xmpp to implement chat application. The Extensible Messaging and Presence Protocol (XMPP) is an open technology for real-time communication, which powers a wide range of applications including instant messaging, presence, multi-party chat, voice and video calls, collaboration, lightweight middleware, content syndication, and generalized routing of XML data.&lt;br /&gt;&lt;br /&gt;Before starting chat implementation need to install jabber server. You can select any jabber server from &lt;a href="http://xmpp.org/software/servers.shtml"&gt;http://xmpp.org/software/servers.shtml&lt;/a&gt; link. I prefer Wildfire. Go with eJabberd if you want to support more number of chat users.&lt;br /&gt;&lt;br /&gt;Next step download JSJaC - JavaScript Jabber/XMPP Client Library from &lt;a href="http://blog.jwchat.org/jsjac/"&gt;http://blog.jwchat.org/jsjac/&lt;/a&gt; link. Extract the archive once you download it.&lt;br /&gt;&lt;br /&gt;Now you require a mediator application which will establish a communication channel between your jabber server and web application with javascript. That is your Jabber Http Bind (jhb) servlet. Download jhb servlet web application from &lt;a href="http://blog.jwchat.org/jhb/"&gt;http://blog.jwchat.org/jhb/&lt;/a&gt; link. The installed jabber server will listen on some specific port for http binding. This url can be accessed using http. But ajax can’t make cross domain communication. So you supposed to post the data to jhb servlet, then jhb intern post to your jabber server. Here you no need to change any code in jhb servlet. Jhb servlet will automatically detect your jabber server settings form requests you make.&lt;br /&gt;&lt;br /&gt;Once all the above three are in place, open simpleclient.html from examples folder. In some browsers it will not work directly. So host the complete jsjac as a web application and then open simplechat.html. Provide below information in simplechat form.&lt;br /&gt;&lt;br /&gt;Select HTTP Binding as Backend Type.&lt;br /&gt;&lt;br /&gt;HTTP Base will be your JHB servlet path (ex: http://localhost:8080/JabberHTTPBind/jhb )&lt;br /&gt;make sure this path will point to your jhb servlet. If every this configured propery then you will get below message once you access jhb url in browser&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;Jabber HTTP Binding Servlet v1.1.1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;This is an implementation of JEP-0124 (HTTP-Binding). Please see http://www.jabber.org/jeps/jep-0124.html for details.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Active sessions: 0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Jabber Server will be localhost or any ip address of the system on which you installed jabber server&lt;br /&gt;&lt;br /&gt;If you are login into first time then give any username and password and check register new account check box and click on login.&lt;br /&gt;&lt;br /&gt;Open another simpleclient.html and add another user account by repeating the above steps.&lt;br /&gt;&lt;br /&gt;Use the usernames that you provided while user creation to start chat.&lt;br /&gt;&lt;br /&gt;You can able to send and receive message using both user accounts. Enjoy the chatting… ;)&lt;br /&gt;If you face any difficulty while configuration post your comments here&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5987566117853352799-6120174192061416107?l=finallyigotit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://finallyigotit.blogspot.com/feeds/6120174192061416107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://finallyigotit.blogspot.com/2009/05/web-based-chating-using-java-script-and.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5987566117853352799/posts/default/6120174192061416107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5987566117853352799/posts/default/6120174192061416107'/><link rel='alternate' type='text/html' href='http://finallyigotit.blogspot.com/2009/05/web-based-chating-using-java-script-and.html' title='Web-based Chating using Java Script and XMPP like gtalk'/><author><name>Vamshi Rapolu</name><uri>http://www.blogger.com/profile/08939811862831628563</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5987566117853352799.post-6970446304721872958</id><published>2009-05-01T10:17:00.000-07:00</published><updated>2009-05-01T10:19:13.213-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML/XSLT'/><title type='text'>Differences between SAX and DOM parsers</title><content type='html'>&lt;span id="sort1"&gt;&lt;span class="tdvamseel"&gt;&lt;p&gt;Both SAX and DOM are used to parse the XML Document. Both has advantages and disadvantages and can be used in our programming depending on the situation&lt;/p&gt;&lt;p&gt;SAX:&lt;/p&gt;&lt;p&gt;1. Parses node by node&lt;/p&gt;&lt;p&gt;2. Doesnt store the XML in memory&lt;/p&gt;&lt;p&gt;3. We cant insert or delete a node&lt;/p&gt;&lt;p&gt;4. Top to bottom traversing&lt;/p&gt;&lt;p&gt;DOM&lt;/p&gt;&lt;p&gt;1. Stores the entire XML document into memory before processing&lt;/p&gt;&lt;p&gt;2. Occupies more memory&lt;/p&gt;&lt;p&gt;3. We can insert or delete nodes&lt;/p&gt;&lt;p&gt;4. Traverse in any direction.&lt;/p&gt;&lt;p&gt;If we need to find a node and doesnt need to insert or delete we can go with SAX itself otherwise DOM provided we have more memory.&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5987566117853352799-6970446304721872958?l=finallyigotit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://finallyigotit.blogspot.com/feeds/6970446304721872958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://finallyigotit.blogspot.com/2009/05/differences-between-sax-and-dom-parsers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5987566117853352799/posts/default/6970446304721872958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5987566117853352799/posts/default/6970446304721872958'/><link rel='alternate' type='text/html' href='http://finallyigotit.blogspot.com/2009/05/differences-between-sax-and-dom-parsers.html' title='Differences between SAX and DOM parsers'/><author><name>Vamshi Rapolu</name><uri>http://www.blogger.com/profile/08939811862831628563</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5987566117853352799.post-9128647169828923425</id><published>2009-05-01T05:51:00.000-07:00</published><updated>2009-05-01T05:55:00.185-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Performance Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='XML/XSLT'/><title type='text'>Render Webpage using XML and XSLT</title><content type='html'>Check your web applicaiton html content, you will find max of your data will be dynamic. You might be rendering the complete html on server. This will introduce load on your server and consume cpu time.&lt;br /&gt;If you transform your data at client side then the size of data that to be sent to client browser will be less. Use below code snippet to transform xml and xslt at client site&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;title&amp;gt;Web page using XML and XSLT&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &amp;lt;style&amp;gt;@import url("yourstylesheet.css");&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &amp;lt;script type="text/javascript"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        var returnval = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        var stylesheet, xmlFile, cache, doc;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        function init(){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            // NSCP 7.1+ / Mozilla 1.4.1+&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            // Use the standard DOM Level 2 technique, if it is supported&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            if (document.implementation &amp;amp;&amp;amp; document.implementation.createDocument) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                xmlFile = document.implementation.createDocument("", "", null);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                stylesheet = document.implementation.createDocument("", "", null);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                xmlFile.load("dynamic.xml");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                stylesheet.load("web/static.xsl");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                xmlFile.addEventListener("load", transform, false);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                stylesheet.addEventListener("load", transform, false);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            //IE 6.0+ solution&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            else if (window.ActiveXObject) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                xmlFile = new ActiveXObject("msxml2.DOMDocument.3.0");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                xmlFile.async = false;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                xmlFile.load("dynamic.xml");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                stylesheet = new ActiveXObject("msxml2.FreeThreadedDOMDocument.3.0");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                stylesheet.async = false;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                stylesheet.load("web/static.xsl");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                cache = new ActiveXObject("msxml2.XSLTemplate.3.0");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                cache.stylesheet = stylesheet;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                transformData();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // separate transformation function for IE 6.0+&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        function transformData(){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            var processor = cache.createProcessor();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            processor.input = xmlFile;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            processor.transform();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            data.innerHTML = processor.output;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        // separate transformation function for NSCP 7.1+ and Mozilla 1.4.1+ &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        function transform(){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            returnval+=1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            if (returnval==2){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                var processor = new XSLTProcessor();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                processor.importStylesheet(stylesheet); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                doc = processor.transformToDocument(xmlFile);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                document.getElementById("data").innerHTML = doc.documentElement.innerHTML;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &amp;lt;body onload="init();"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &amp;lt;div id="data"&amp;gt;&amp;lt;!-- this is where the transformed data goes --&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5987566117853352799-9128647169828923425?l=finallyigotit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://finallyigotit.blogspot.com/feeds/9128647169828923425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://finallyigotit.blogspot.com/2009/05/render-webpage-using-xml-and-xslt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5987566117853352799/posts/default/9128647169828923425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5987566117853352799/posts/default/9128647169828923425'/><link rel='alternate' type='text/html' href='http://finallyigotit.blogspot.com/2009/05/render-webpage-using-xml-and-xslt.html' title='Render Webpage using XML and XSLT'/><author><name>Vamshi Rapolu</name><uri>http://www.blogger.com/profile/08939811862831628563</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
