透過JS跨網域存取XML檔
為了一些安全性的因素,通常伺服器會阻擋跨網域的XML存取,當然如果你是該網站開發者,所開發的頁面應該將會被放在被認可的網域中,不會碰到這個問題,但我們在開發前期有可能會不在所屬的網域,這樣就會造成開發上的困難,不過我們可以透過Yahoo所提供的YQL查詢語法來解決這個問題,以下就是相關的說明:
若我們在自己的電腦用以下的語法去存取一個網路上的XML
<script> $(function () { var xmlSource = "http://stanley.cloudlab.tw/crossDomainXML/testXML.xml"; $.ajax({ url: xmlSource, success: function (data) { console.log(data); } }) }) </script>
很可能會出現「No Access Control Allow Origin」的訊息:

但如果套用上YQL之後
<script> $(function(){ var xmlSource = "http://stanley.cloudlab.tw/crossDomainXML/testXML.xml"; var yqlURL = [ "http://query.yahooapis.com/v1/public/yql", "?q=" + encodeURIComponent("select * from xml where url='" + xmlSource + "'"), "&format=xml&callback=?" ].join(""); $.getJSON(yqlURL, function(data){ console.log(data) }); }) </script>

可以看到已經可以抓到XML內容,這樣可以讓我們較為方便的去開發,其他詳細的使用說明可以參考Yahoo YQL Guide。
https://onlineph24.com/# Persantine
va online pharmacy
вывод из запоя цены ростов вывод из запоя цены ростов .
target pharmacy viagra: Top Avana – disulfiram online pharmacy
kroger pharmacy crestor: people’s pharmacy zyrtec – online pharmacy permethrin
Отличный сайт! Всем рекомендую!печать на холсте в Тюмени
pharmacy online uk: Cipro – escrow pharmacy online
Great – I should definitely pronounce, impressed with your web site. I had no trouble navigating through all tabs as well as related info ended up being truly easy to do to access. I recently found what I hoped for before you know it at all. Quite unusual. Is likely to appreciate it for those who add forums or anything, site theme . a tones way for your customer to communicate. Nice task.
ritalin online pharmacy: clozapine hospital pharmacy – lamictal pharmacy prices
https://easydrugrx.com/# which pharmacy has the best price on viagra
pharmacy bangkok viagra
My website – Daycare Near Me By State
Feel free to surf to my website: Daycare Near Me – Find The Best Daycares Near You
certainly, the environmental news theses days are not so good but there are other good news too like opening of new forest reserves“
https://easydrugrx.com/# viagra direct pharmacy
no prescription online pharmacy
glucophage pharmacy: pharmacy direct cialis – pharmacy price of percocet
Here is my website: Find top-rated certified Daycares in your area
holy crap, chlaymdia is one of the worst disease that you could ever have. it is very very nasty~
Great site! I recommend it to everyone!realistic dildos
Good post. I learn something new and challenging on blogs I stumbleupon everyday. It’s always interesting to read articles from other authors and use a little something from their websites.
You are my intake , I have few blogs and often run out from to post : (.
https://easydrugrx.com/# pharmacy rx online
adipex online pharmacy diet pills
One more thing I would like to express is that rather than trying to match all your online degree tutorials on days and nights that you finish work (as most people are tired when they go back home), try to find most of your sessions on the weekends and only a couple of courses on weekdays, even if it means taking some time away from your saturdays. This is fantastic because on the weekends, you will be much more rested along with concentrated for school work. Thanks a lot for the different guidelines I have mastered from your website.
https://pharm24on.com/# pharmaceutical online ordering
walgreen pharmacy
I’m amazed, I have to admit. Seldom do I come across a blog that’s both equally educative and engaging, and without a doubt, you have hit the nail on the head. The issue is something too few people are speaking intelligently about. I’m very happy that I stumbled across this during my search for something regarding this.
Great post. I am facing a few of these issues as well..
Ginette-35: rx one pharmacy – non prescription online pharmacy
This really resonates with my own experiences.오피
https://drstore24.com/# lortab online pharmacy no prescription
proscar uk pharmacy
It’s a pity you don’t have a donate button! I’d most certainly donate to this excellent blog! I suppose for now i’ll settle for book-marking and adding your RSS feed to my Google account. I look forward to fresh updates and will share this website with my Facebook group. Chat soon!
I really like your blog.. very nice colors & theme. Did you design this website yourself or did you hire someone to do it for you? Plz answer back as I’m looking to create my own blog and would like to know where u got this from. thank you
https://onlineph24.com/# unc student store pharmacy
cheapest pharmacy to buy cialis