Internet Products
Showing results for 
Search instead for 
Did you mean: 

HTML / XML Parsing


HTML / XML Parsing

I am not too sure (again) if this is the right place to place this question. Suggestion of proper category will be appreciated.

1. Referring to w3schools' website( ) This works in this page itself but if i test this exact code saved as .html file in my computer, it deosn't work.

2. Below is a line of code which I have found being used to Parse XML codes.

var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");

My aim is to load HTML file (not the currently being used one) and use it to change/add objects to the loaded html file using DOM properties (document.body.parentnode.childnode.value e.t.c.)The above code line does not work for HTMLs
So, the question is that, why does the exact code saved in my computer wouldn't work?
What should I do to load an html file instead of xml file?

Thanks in advance
Jasdev Singh
Esteemed Contributor

Re: HTML / XML Parsing

Hi Anand,

Sorry for anwering this post very late, but as i am the new user of this forum so might help this post...

when you copy the contents and when you look at the code xmlDoc.load("note.xml")
you chnange the code to
xmlDoc.load("") and then save your html file and then you open the page.

it opens...


Ganesha Sridhara
Honored Contributor

Re: HTML / XML Parsing

Hello Anand,

The avobe given steps worked perfectly in my machine.

-------------- note.xml ------------------



In the browser (IE) following output is displayed:
The first child element in the file contains: Ganesha

The Msxml.dll file is present in your system or not.

Please download the Microsoft.XMLDOM:


Ganesha Sridhara

Jasdev Singh
Esteemed Contributor

Re: HTML / XML Parsing

Hi Ganesha Sridhara,

assigning points to this post be appriciated...

thank you,