Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - javascript parentNode [Thread Next] Re: javascript parentNodeTo: NULL Date: 4/2/2006 1:41:00 PM
anupamjain@g... wrote:
> 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>
As you posted to an XML group, I assume that the above is XHTML, not
HTML. In the case of HTML, the tbody element would be there implicitly,
even if you did not write it in your code. In the case of XHTML, it
would not be there.
In general: for HTML use HTML tools, for XHTML use XML tools.
If you have problems with HTML, post to an HTML group.
--
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
