Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old June 19th, 2007, 11:02 AM
Registered User
Join Date: Jun 2007
Location: Worthington, MN, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

quote:The only way is to use a server-side proxy that relays the requests from your server to the real server. Cross domain access is only forbidden on the client, servers have free reign.
Forgive me, for I'm newer to programming, and have much to learn.

So, if for example, my code was this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<title>CBS Radio Network NewsFeed</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script type="text/javascript">
var xmlDoc;
function loadXML()
// code for IE
if (window.ActiveXObject)
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation &&
  alert('Your browser cannot handle this script');

function getmessage()

<body onload="loadXML()">
    <div id="CBSFeed">
        <h1><span id="title"></span></h1>
        <p><span id="description"></span></p>
How would I go about doing this crazy magic you call server-side proxy? =)

Are you not entertAIn3d?
Reply With Quote
  #12 (permalink)  
Old June 19th, 2007, 11:16 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

You'll have to scour Google for examples. Basically you have a web service running on your server that accepts as a parameter the desired URL, 'http://cbsradionewsfeed.com/rss.php?id=32&ud=146', for example. It then loads the content from this URL and passes it back to the original client. As the content is coming from the same domain as the client all is well. I believe Grease Monkey have a server-side proxy that can be used by others, try their site for ideas.


Joe (Microsoft MVP - XML)
Reply With Quote
  #13 (permalink)  
Old May 12th, 2010, 07:01 AM
Registered User
Join Date: May 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

Code mentioned by Kalpakavalli.S works fine
 var fsoXML = new ActiveXObject("Scripting.FileSystemObject");
	var XMlFile = fsoXML.OpenTextFile("C:\\File1.xml",1);
	var Data = XMlFile.ReadAll();

A bracket was left opened in OpenTextFile function..That was why Objecr Expected alert comes
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access denied, can't create xml file from ASP.NET goldablasha C# 3 February 27th, 2007 05:50 AM
How to load an xml file that is in same project? tryston02 C# 2005 1 November 28th, 2006 02:50 PM
Getting VB.NET to load & update XML file kyma XML 0 March 19th, 2005 04:58 PM
access denied when uploading file daliaca BOOK: ASP.NET Website Programming Problem-Design-Solution 1 January 16th, 2005 11:08 AM
LOAD A XML FILE FROM JAVASCRIPT nen Javascript How-To 1 December 20th, 2004 11:03 AM

All times are GMT -4. The time now is 10:05 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.