First of all Im sorry because of my english.
I have a working project with a php script, but i'd like to "convert" it to java, so in this way it could be a client side "application".
(Maybe the Thread's title wrong so i try to explane it.)
I have an xml file (with http:// address) and i want read and display specific parts of it in a html page.
XML structure example:
If i want to display example the second book's informations in a html page, like:
Name: Example 2
What script should I use?
Please be patient im really new in this.
Thank You Guys.
Ideally, you should look at running an XSLT script on your server, but that will not be possible for everyone, so next thought is to read you file in with AJAX
It might be easier to convert the xml results to JSON within your PHP. If you load in the xml to an array you can quickly export JSON with json_encode(). Then as omnicity suggested you can use AJAX to ask the php script for results in JSON ready for use.
Thank you guys for the fast reply, but i think you misunderstand me
I'd like to use a java script insteed of php. If i use java the client can handle it and i dont need to use a webserver to run the php script.
Yes, i found several article, and i tryed to create a working code, but as i mentioned before i can't use java.
I was hoping that maybe someone can atleast grab an example from any article and convert it to my project.
If smbody would do that i could extend the script to my claim.
you can do it using the dom and ajax to fetch the xml document.
read up w3schools's ajax + xml sections.
Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)