透過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://maxviagramd.shop/# discreet shipping
find out here https://web-foxwallet.com
secure checkout Viagra cheap Viagra online cheap Viagra online
best price Cialis tablets: FDA approved generic Cialis – order Cialis online no prescription
перейти на сайт https://forum.hpc.name/thread/g172/143189/rekomenduemye-knigi-po-strukturam-dannyh-svyazannym-spiskam-stekah-ocheredyah-i-derevyam.html
legit Viagra online: safe online pharmacy – same-day Viagra shipping
покупка электроники интернет магазины электроника магазин купить
best price for Viagra: secure checkout Viagra – legit Viagra online
verified Modafinil vendors modafinil 2025 modafinil legality
http://maxviagramd.com/# buy generic Viagra online
http://zipgenericmd.com/# order Cialis online no prescription
https://maxviagramd.shop/# secure checkout Viagra
Consistent reassurance from a partner helps address performance anxiety with vardenafil dosage. Speed and secrecy – delivered flawlessly.
Asking questions are genuinely fastidious thing if you are not understanding something fully,however this piece of writing presents fastidiousunderstanding yet.
social media account marketplace https://buy-accounts-shop.pro
buy generic Cialis online: Cialis without prescription – generic tadalafil
you could try here https://web-foxwallet.com/
legal Modafinil purchase: purchase Modafinil without prescription – buy modafinil online
cheap Viagra online: best price for Viagra – no doctor visit required
modafinil legality safe modafinil purchase modafinil 2025
Cialis without prescription: buy generic Cialis online – order Cialis online no prescription
The site offers a large selection of pharmaceuticals for ordering online.
Users can easily order treatments from your device.
Our catalog includes standard drugs and specialty items.
Each item is provided by reliable pharmacies.
kamagra pill
We ensure user protection, with private checkout and fast shipping.
Whether you’re filling a prescription, you’ll find safe products here.
Visit the store today and enjoy reliable healthcare delivery.
http://modafinilmd.store/# purchase Modafinil without prescription
order Viagra discreetly discreet shipping legit Viagra online
secure checkout ED drugs: affordable ED medication – Cialis without prescription
important source https://web-foxwallet.com
buy modafinil online: doctor-reviewed advice – buy modafinil online
same-day Viagra shipping: generic sildenafil 100mg – safe online pharmacy
generic tadalafil: best price Cialis tablets – best price Cialis tablets
buy generic Cialis online: affordable ED medication – online Cialis pharmacy