> After setting the content using setMixedContent(),still when I try
> to get the root element, it is returning null;
Because your mixed content didn't include an Element. That call sets
all content directly hanging off the document.
> and I didn't get the logic behind implemetation of addContent(PI)
> and addContent(Comment) to append the same at the end of document.
This has been heavily discussed in the archives. I'll add a FAQ about
it later too.
-jh-