Hi. I was curious about how one should treat the insertBefore
method of the Node interface in the Document implementation.

I don't quite have a grand overview of the entire Xerces implementation,
but in CoreDocumentImpl.java I found:

   super.insertBefore(newChild,refChild);

   // If insert succeeded, cache the kid appropriately
   if (type == Node.ELEMENT_NODE) {
       docElement = (ElementImpl)newChild;
   }

And ParentNode seems to indeed insert the child. So a document
can have multiple children? The element returned by getDocumentElement
returns the docElement, but should a such be able to have siblings?
There should only be one top level element to my understanding. What
am I missing here?

Thanks,

Morten



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to