Thanks ...but the question I was raising was that the document format was
XML (not HTML)
however it does appear that document.documentElement is the correct syntax
but there may be a timing issue.
for example .alert(
window.frames['xmldoc']..document.documentElement.tagName) does work if the
document has fully
finished loading.
the problem APPEARS to be that a document onload event does not necessarily
mean that the document is actually ready for returning the
documentElement.tagName
"R_O_O_K" <rook@xxxxxxxx> wrote in message
news:c5jj0i$15v7$1@xxxxxxxxxxxxxxxxxx
> Dnia 2004-04-14 14:40, U¿ytkownik rvj napisa³:
> > how do you determine the root node in an xml file?
> >
> > I seem to remember something documentElement that did this?
> >
> > <?xml version="1.0"?>
> > <?xml-stylesheet href="xml.css" type="text/css"?>
> > <slide xmlns:html="http://www.w3.org/1999/xhtml" >
> > ...
> > </slide>
> >
> >
> >
> > alert(windows.frames['xml'].documentElement ) // slide !
> >
> >
> alert(windows.frames['xml'].contentDocument.documentElement )
>
>
> nsIDOMHTMLElement.contentDocument returns a nsIDOMDocument, wchich can
> be further navigated and processed.
>
> See http://xml.coverpages.org/dom.html#DOMLevel2 (this is DOM v2
> specification by W3C). Mozilla folows that spec closely and thus it's
> the best resource for mozilla DOM programmers I know
>
> Michal Ziemski
>
|