A
anupamjain
An interesting thing is happening. My table doesnt have 'TBody', but
the elem.parentNode.tagName is returning 'TBody' where elem refers to
the 'tr' tag.
Shouldnt it be returning 'table' ?
<body>
<table>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
</table>
</body>
Also, its adding html tag even if its not present in the document (if I
lookup parentNode of body). Is there a way to tell javascript not to be
intelligent? (because I am building an xpath and I want to extract the
exact xpath from the real-world-html-document)
Thanks,
Anupam
the elem.parentNode.tagName is returning 'TBody' where elem refers to
the 'tr' tag.
Shouldnt it be returning 'table' ?
<body>
<table>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
</table>
</body>
Also, its adding html tag even if its not present in the document (if I
lookup parentNode of body). Is there a way to tell javascript not to be
intelligent? (because I am building an xpath and I want to extract the
exact xpath from the real-world-html-document)
Thanks,
Anupam