<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=504051819-10102005>The JDOMResult
object JavaDoc gives this example on how to get a List of JDOM Nodes
back. What if the result of my parse is not an XML document at all,
but is a Text String?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=504051819-10102005></SPAN></FONT> </DIV>
<DIV><PRE><CODE> public static List transform(Document doc, String stylesheet)
throws JDOMException {
try {
Transformer transformer = TransformerFactory.newInstance()
.newTransformer(new StreamSource(stylesheet));
JDOMSource in = new JDOMSource(doc);
JDOMResult out = new JDOMResult();
transformer.transform(in, out);
return out.getResult();
}
catch (TransformerException e) {
throw new JDOMException("XSLT Transformation failed", e);
}
}
</CODE></PRE></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=504051819-10102005>-Kevin</SPAN></FONT></DIV>
<P style="MARGIN-BOTTOM: 0in"></P>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>