File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "AJAX XML example" Watch "AJAX XML example" New topic

AJAX XML example

Aditya Kanitkar
Ranch Hand

Joined: Aug 08, 2009
Posts: 72

One more Ajax example from 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

Joined: Mar 22, 2005
Posts: 41020
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 - my free Android networking tools app
Deepak Kumar Jena
Ranch Hand

Joined: Sep 08, 2010
Posts: 68

Sunderam Goplalan
Ranch Hand

Joined: Oct 10, 2011
Posts: 73
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:
subject: AJAX XML example
Similar Threads
Using AND operation in XPath
algorithm problem with recursion
Help with JSN file
xml xls not seeing anything
Newbie needs help - use AJAX to open ASP?