XWidgetSoft Forum https://www.bbs.xwidget.com/ |
|
XML dom parser/XPath https://www.bbs.xwidget.com/viewtopic.php?f=3&t=2933 |
Page 1 of 1 |
Author: | digigamer [ April 12th, 2013, 6:26 am ] |
Post subject: | XML dom parser/XPath |
Hi, This is infact an issue that I feel is typically unique to me. AAMOF, I access a lot of web services in my widgets and they return data in XML. As I'm from a programming background, I'm addicted to AJAX and DOM in web pages and XPath in applcations. So if you guys can, then please, add support for XPath or DOM for XML. Currently I use regex in my widgets and regex is very cumbersome. Thanks. |
Author: | digigamer [ April 23rd, 2013, 6:17 pm ] |
Post subject: | Re: XML dom parser/XPath |
Now, this is fixed. I figured out that XWidget uses windows script host. It allowed me to create ActiveX objects. For those interested how to fix it Code: var xmlhttp = false;
try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } if(xmlhttp) { xmlhttp.open("GET", "url_goes_here_", true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var doc = xmlhttp.responseXML; //do something with doc } } xmlhttp.send(null); } else { alert("Fatal Error: Perhaps you don't have MSXML installed"); } |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |