Bug 53201 NPE when re-running newly generated javadoc.xml
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWriter.java
* Create a JavadocWriter on the given output stream.
	 * It is the client's responsibility to close the output stream.
	 * @param basePath The base path to which all path will be made relative (if
	 * possible). If <code>null</code>, paths are not made relative.
	 */
	public JavadocWriter(OutputStream outputStream, IPath basePath, IJavaProject[] projects) {
		Assert.isNotNull(outputStream);
		fOutputStream= new BufferedOutputStream(outputStream);
		fBasePath= basePath;
		fJavaProjects= projects;
	}
	public void writeXML(JavadocOptionsManager store) throws ParserConfigurationException, TransformerException {
		DocumentBuilder docBuilder= null;
		DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
		factory.setValidating(false);
		docBuilder= factory.newDocumentBuilder();
		Document document= docBuilder.newDocument();
		
		Element project= document.createElement("project"); 
		document.appendChild(project);
		project.setAttribute("default", "javadoc"); 
		Element javadocTarget= document.createElement("target"); 
		project.appendChild(javadocTarget);
		javadocTarget.setAttribute("name", "javadoc"); 
		Element xmlJavadocDesc= document.createElement("javadoc"); 
		javadocTarget.appendChild(xmlJavadocDesc);
		if (!store.isFromStandard())
			xmlWriteDoclet(store, document, xmlJavadocDesc);
		else
			xmlWriteJavadocStandardParams(store, document, xmlJavadocDesc);