Null pointer exception with document.getDocumentElement??? using DOM.
843834Oct 16 2006 — edited Oct 16 2006I 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...