Inserting XML into a webpage.

J

james.qian

Hi, and thanks in advance for helping me out.

I have an XML file, with an XSL style sheet attached, and I want to use
this XML file as a news feed on my personal site, instead of using PHP.

Is there any way to insert this XML file into the body of my site
without using iframes or using DOM to parse it? I was trying to use
DOM to load it and display it as is, but being a noob at this, I
totally screwed up.

Maybe load it and appendChild?

If GooglePages allows hotlinking, here is a link to the file (i
disallowed hotlinking on my own site, so i had to upload it here):
http://james.qian.googlepages.com/news.xml
 
D

David Dorward

I have an XML file, with an XSL style sheet attached, and I want to use
this XML file as a news feed on my personal site, instead of using PHP.

Is there any way to insert this XML file into the body of my site
without using iframes or using DOM to parse it?

Most server side languages can do this, those available to you depend on
your webserver.
 
A

Andy Dingley

I have an XML file, with an XSL style sheet attached, and I want to use
this XML file as a news feed on my personal site, instead of using PHP.

Do it server-side with PHP.

You could do it client-side instead. But this is no easier to code, and
it's getting to be browser-dependent. Server-side is simpler to deploy.
If you really want to do this client-side though, look into AJAX.
 
J

Joe Kesselman

Maybe load it and appendChild?

Load, importNode (may be needed to get the new data into objects
compatable with the ones you want to add it to), and append or insert as
appropriate.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,002
Messages
2,570,258
Members
46,857
Latest member
ArleenWill

Latest Threads

Top