Error creating new element.....
I am using following code with jdk 1.4 it is working correctly but with jdk1.5 it is not working:
DocumentBuilderFactory builderFactory =null;
DocumentBuilder builder =null;
Document doc =null;
try{
builderFactory = DocumentBuilderFactory.newInstance();
builder = builderFactory.newDocumentBuilder();
doc = builder.newDocument();// it is returning [#document: null]
Element formEle = doc.createElement("Output");//it is returning [Output: null]
}catch(Exception e){}
As per result of execution of this code at jdk1.4 should be in xml format. But in jdk1.5 because of null when i am appending any child and element. Its result is always [Output: null].
Please suggest me what i will do to remove this error.
Thanks......

