Parsing using Dom produces type mismatch

IODICHCOERY

New Member
Given the following code , under Eclipse , I get a type mismatch error :\[code\]package xmlInterface;import javax.swing.text.*;import org.w3c.dom.*;import org.w3c.dom.Document;import gameManage.round;import java.io.File;import javax.lang.model.element.Element;import javax.swing.text.Segment;import javax.xml.parsers.DocumentBuilder;import javax.xml.parsers.DocumentBuilderFactory;import javax.xml.parsers.ParserConfigurationException;import com.sun.org.apache.bcel.internal.classfile.Method; public void writeToXml(round[] games) throws ParserConfigurationException { int i; // build a doucument by the parser DocumentBuilderFactory document = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = document.newDocumentBuilder(); Document doc = docBuilder.newDocument(); Element rootElement = doc.createElement("GameOut");.........}\[/code\]I get the following error in Eclipse : \[code\]Type mismatch: cannot convert from org.w3c.dom.Element to javax.lang.model.element.Element\[/code\]Can anyone please explain how can I fix this ? Thank you Jason
 
Back
Top