I came accross this issue as well.. works in Eclipse Ganymede, do not in DDE. Below is a sample I worked with:
[CODE]
/**
* @author Köll S. Cherizard
* @version: 2011.02.27.12.07.AM
*
*/
import java.io.File;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
public class XMLReader {
public static void main(String argv[]) {
try {
//TO DO: Load file from Application or properties file
//2011.02.27.12.17.AM
//File file = new File("c:\\temp\\XML_DATA\\StateList.xml");
File file = new File("..\\files\\StateList.xml");
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(file);
doc.getDocumentElement().normalize();
System.out.println("Root element " + doc.getDocumentElement().getNodeName());
NodeList nodeLst = doc.getElementsByTagName("states");
System.out.println("Information of all States");
for (int s = 0; s < nodeLst.getLength(); s++) {
Node fstNode = nodeLst.item(s);
if (fstNode.getNodeType() == Node.ELEMENT_NODE) {
Element fstElmnt = (Element) fstNode;
NodeList fstNmElmntLst = fstElmnt.getElementsByTagName("statename");
Element fstNmElmnt = (Element) fstNmElmntLst.item(0);
NodeList fstNm = fstNmElmnt.getChildNodes();
System.out.println("State Name : " + ((Node) fstNm.item(0)).getNodeValue());
NodeList lstNmElmntLst = fstElmnt.getElementsByTagName("cityname");
Element lstNmElmnt = (Element) lstNmElmntLst.item(0);
NodeList lstNm = lstNmElmnt.getChildNodes();
System.out.println("City Name : " + ((Node) lstNm.item(0)).getNodeValue());
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
[/CODE]
Have you considered throwing the data in the browser, and grab it with Xpages that way, via SSJS; you probably have already tried that option (if not search XML as datasource)... You can actually write addtional Java code to feed the XML data to Xpages.
I currently have a Java option working, still needs work but I'll post it when complete...
In a bit!