|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Aug 2007
Posts: 377
|
XML and RSS
How can I read an XML file (for RSS for example) from the client?
Thanks! |
|
|
|
|
|
#2 |
|
Community Advisor
![]() ![]() Join Date: May 2003
Location: Washington, DC
Posts: 9,129
|
Generally, you will have to use some sort of XML parser. What exactly is "the client"?
|
|
|
|
|
|
#3 |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Aug 2007
Posts: 377
|
The thing is the xml file isn't relative to a server. I making the request from my desktop and my permission is denied (for security purposes I naturally assume) so how do apps like newsgator get their permissions to be allowed?
Thanks for the help btw.. |
|
|
|
|
|
#4 |
|
He's No Good To Me Dead
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Feb 2003
Location: Slave I
Posts: 24,090
|
You should ask the client if they have any sort of security or permission based system in place that you need to be aware of. Otherwise they may just be experiencing an error or maybe you are, too. I suspect there is an error in your software or code.
|
|
|
|
|
|
#5 |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Aug 2007
Posts: 377
|
Lol stymiee the client is me.
I, being that client, am trying to access an xml file to play around with the rss. I really want to say it's a syntax error, the only thing is I'm able to parse xml files locally, if I try to grab an XML file from a website though I get a permission error. Error is this in ff: uncaught exception: Permission denied to call XMLDocument.load. Apps like newsgator don't have a problems accessing xml files, how can I do the same? |
|
|
|
|
|
#6 |
|
He's No Good To Me Dead
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Feb 2003
Location: Slave I
Posts: 24,090
|
That's pretty odd. Sounds more like a FF issue then an issue on your end. What's the URL of the feed?
|
|
|
|
|
|
#7 |
|
Community Advisor
![]() ![]() Join Date: May 2003
Location: Washington, DC
Posts: 9,129
|
By "exactly what is the client" I mean "exactly what is the client application", not who is trying to load stuff. Are you building a browser-based tool, or a desktop tool, or what? And what exactly is the permission error while we are at it.
|
|
|
|
|
|
#8 |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Nov 2005
Location: Moss, Norway.
Posts: 274
|
Related sitepoint link: http://www.sitepoint.com/forums/showthread.php?t=494736 |
|
|
|
|
|
#9 | ||||
|
SitePoint Addict
![]() ![]() ![]() Join Date: Aug 2007
Posts: 377
|
Quote:
![]() Quote:
Quote:
Quote:
I was going to try to change configuration for each browser, I could do this with my web server too? Thanks guys, you've all been awesome. |
||||
|
|
|
|
|
#10 |
|
Community Advisor
![]() ![]() Join Date: May 2003
Location: Washington, DC
Posts: 9,129
|
Ah, I thing I did miss that.
Basically, the issue is that XmlHttp requests cannot be made to a different domain for security reasons. This is actually a very good thing. What you need to do, as kgun indicates, is to setup a server-side script to proxy the feed to your site, then use XmlHttp to access things locally. The other option would be to just write a thick-client rather than a browser-based program to handle this stuff. |
|
|
|
|
|
#11 | |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Aug 2007
Posts: 377
|
Quote:
|
|
|
|
|
|
|
#12 |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Aug 2007
Posts: 377
|
I just ended up writing a file for it.
It works great. Again, wwb_99, stymiee, and kgun thank you. ![]() |
|
|
|
|
|
#13 |
|
Non-Member
![]() ![]() ![]() ![]() Join Date: Nov 2007
Posts: 433
|
xml=new ActiveXObject("Microsoft.XMLDOM");
xml.async=false; xml.load("xx.xml"); now its can display or append anything you can do from client side |
|
|
|
|
|
#14 |
|
Community Advisor
![]() ![]() Join Date: May 2003
Location: Washington, DC
Posts: 9,129
|
Let me know how well that works in anything but Internet Explorer.
|
|
|
|
|
|
#15 |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Nov 2005
Location: Moss, Norway.
Posts: 274
|
The worst browser on the internet, and should have been forbidden. They follow their own standards, especially regarding DOM scripting that is a very important part of web applications like AJAX. IE should have been banned until MS start to follow the http://www.w3.org/ standards. Creating a science of the web http://webscience.org/ is not always easy.
Worst of all, new computers come with IE preinstalled. MS is best on operating systems and office solutions in my view. KW' search: CSS hacks Internet explorer Java Script problems with internet explorer. Writing DOM event listeners according to the W3C DOM 2 specification is extremely simple. The Internet Explorer version is a night mare in comparison. I am an economist. These lack of standards has costed the world billions of USD in loss of efficiency, lack of usability and accessibility. Browser security. There are no more secure web browser than Opera as far as I know. Security zones in IE is not secure at all. It is false security. If you talk about web security, I can not simply take you as a surfer seriously if you do not use a secure browser. Did you say that you was attacked by cross browser scripting or your bank account was hacked. First question, which browser did you use? May be Google will soon come up with the best web browser? Google can start from scratch and follow the web standards set by W3c from the very beginning. A web page as a web browser sees it is a bitstream. The clue is how that bitstream is deciphered by the browser. Make it simple, as simple as possible but no simpler. Until the opposite is proved, that is following the web standards IMO Your disable friend may thank you if you teach him to use Opera. Down load it and clik on view + Of course, http://widgets.opera.com/ Opera also have their widgets. Is there a better browser for mobile devices to get a kick start on the mobile revolution? I am from Norway, so I am not prejudice free, but I am not related to Opera. |
|
|
|
|
|
#16 |
|
Community Advisor
![]() ![]() Join Date: May 2003
Location: Washington, DC
Posts: 9,129
|
While IE does have its issue, let us not forget that Microsoft invented AJAX and implemented long before Mozilla was a pipe dream by some netscape engineers.
|
|
|
|
|
|
#17 |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Nov 2005
Location: Moss, Norway.
Posts: 274
|
But they did not invent http://info.cern.ch/ the web or object oriented programming http://www.cetus-links.org/oo_simula.html more specifically here http://heim.ifi.uio.no/~kristen/FORS..._OO_start.html and wasn't this the formal http://www.adaptivepath.com/ideas/es...ves/000385.php start of AJAX.
I have heard the following, but do not know if it is true. You may call Microsoft about problems with IE. You may get the following answer: "Deinstall it and install another browser". My advice was for surfers with and without disabilities and especially for mobile surfers in Asia and Africa. Web masters must of course develope their page for IE. Here is one of my favourites: http://www.equalityhumanrights.com/e...s/default.aspx Much of that usability and accessibility is already there in Opera. |
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 22:37.








I, being that client, am trying to access an xml file to play around with the rss. I really want to say it's a syntax error, the only thing is I'm able to parse xml files locally, if I try to grab an XML file from a website though I get a permission error. 



Linear Mode
