Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Inserting XML into a webpage.

Reply
Thread Tools

Inserting XML into a webpage.

 
 
james.qian@gmail.com
Guest
Posts: n/a
 
      05-10-2006
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

 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      05-11-2006
wrote:

> 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.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
 
 
 
Andy Dingley
Guest
Posts: n/a
 
      05-11-2006
wrote:

> 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.

 
Reply With Quote
 
Joe Kesselman
Guest
Posts: n/a
 
      05-11-2006
wrote:
> 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.
 
Reply With Quote
 
james.qian@gmail.com
Guest
Posts: n/a
 
      05-12-2006
Thanks, Joe, I'll try that.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting an element into existing xml file Anand Python 4 09-26-2007 07:24 AM
error when inserting xml into database - string literal too long nikkilou@nycap.rr.com Java 0 06-24-2006 06:03 AM
inserting raw xml into a rexml document Ara.T.Howard Ruby 2 12-11-2005 07:16 AM
cycle through XML inserting into DB via SP's mark ASP .Net 2 01-05-2004 08:45 PM
how to write some xml into huge xml file into speceific location??? Xenia XML 4 11-25-2003 07:14 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57