Friday, July 27, 2007
VS 2008 'orcas' beta 2 released
MSDN Library for Visual Studio 2008 Beta 2 can be downloaded from this link .
I will spend next few days to grasp the changes in this new release. And come up with new posts soon.
Thursday, July 26, 2007
VS 2008 'orcas' beta 2 will be available in few days
Microsoft will announce Thursday morning the release of Visual Studio 2008 Beta 2. According to Scott Guthrie, the general manager of Microsoft's Developer Division, the release will be nearly feature complete and will likely be the last major release before the product is released to manufacturing in preparation for its launch on February 27, 2008.
Monday, July 9, 2007
Reading a XML file using JScript
My current project required me to consume and display data from a xml file. XML! hey microsoft has made programmer's life easy by providing various xml classes. But i was asked to use same old scripting languages. I started with javascript and then XMLDOM. Document Object Model, yeah we all have heard about it since last decade. Now let me show how you can also make use of XMLDOM using JScript
Requirements :
1. MSXML 3.0 or above
2. Text editor like notepad
3. Internet Explorer 4.0 or later
4. A XML file, Products.xml is included in the attached file
Note: If u have windows xp or 2003 installed on
var dom = new ActiveXObject("msxml2.DOMDocument.3.0");
First create a instance of msxml DOM object.Above code will work for MSXML 3.0 or above as "Msxml2.DOMDocument.3.0" is ProgID for MSXML 3.0.
For those who are still wondering, MSXML is the Microsoft XML Core Services.
dom.load("products.xml");
once this is done we can use various DOM methods and properties to access and manipulate the XML data.
var oNodes = dom.selectNodes("//Product[0]/*");
var node = oNodes.nextNode; alert(node.text);
This was my first experience with JScript and also MSXML. Also attached a hello world test file to get you started with MSXML DOM. Do write to me about any queries.