XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently May 8th, 2025, 8:49 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: XML dom parser/XPath
PostPosted: April 12th, 2013, 6:26 am 
Offline
User avatar

Joined: March 8th, 2013, 10:27 pm
Posts: 353
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.

_________________
Life is a myriad game... Just play it!


Top
 Profile  
 
 Post subject: Re: XML dom parser/XPath
PostPosted: April 23rd, 2013, 6:17 pm 
Offline
User avatar

Joined: March 8th, 2013, 10:27 pm
Posts: 353
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");
}

_________________
Life is a myriad game... Just play it!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 61 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group