aspose file tools*
The moose likes XML and Related Technologies and the fly likes AJAX XML example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "AJAX XML example" Watch "AJAX XML example" New topic
Author

AJAX XML example

Aditya Kanitkar
Ranch Hand

Joined: Aug 08, 2009
Posts: 72
Hi,

One more Ajax example from w3schools.com. It is about fetching from an XML file with AJAX technology.

To fetch data from Ajax file an ASP code is written.



I want to implement the same logic in JSP.

Can anyone give me some idea?

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
Are you asking how to replace XML handling code written in ASP by XML handling code in Java/JSP? The code seems pretty straight-forward to me; are you familiar with the Java XML APIs? If not, then the Xmlfaq points to various introductory materials.


Ping & DNS - updated with new look and Ping home screen widget
Deepak Kumar Jena
Ranch Hand

Joined: Sep 08, 2010
Posts: 68



dkj4jdk
Sunderam Goplalan
Ranch Hand

Joined: Oct 10, 2011
Posts: 67
In JSP the code would be similar. You can wrap the XML retrieval in a <script> tag
You would make the AJAX request and get the data in the onload handler like so.



Here is one way to implement the callback



SCJP 5.0 , SCEA Java EE 5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AJAX XML example
 
Similar Threads
xml xls not seeing anything
Using AND operation in XPath
algorithm problem with recursion
Help with JSN file
Newbie needs help - use AJAX to open ASP?