Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Null pointer exception with document.getDocumentElement??? using DOM.

843834Oct 16 2006 — edited Oct 16 2006
I am writing into xml using Dom and my XML file is like this:
<?xml .......................?>
<site Details>
<Site>
<Name>a1</Name>
<Addr>s<Addr>
</Site>
</Site Details>
when i wanted to append more elements to this xml file....I tried to get the root element by document.getDocumentElement()....which shld return the root element,to which i can add new elements.but i am getting null value and when i add other element to it i am getting null pointer exception....i chkd forum and got no new answer than this method...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2006
Added on Oct 16 2006
1 comment
296 views