Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: javascript parentNode javascript parentNodeTo: NULL Date: 4/2/2006 3:32:00 AM 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 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
