J
Jeff
I have a node that I'd call a text node, but the parser disagrees. At
any rate, I'd like to get the text out of it. (It is some text with
infrequent markup.
I'm using Xalan and Java. getNodeValue() returns null, and
isTextNode(n) returns false. Here is the only code I've been able to
use to get the text out:
ByteArrayOutputStream baotc = new ByteArrayOutputStream();
StreamResult out = new StreamResult(new OutputStreamWriter(baotc));
serializer.transform(new DOMSource(n), out);
String tt = baotc.toString();
It actually gives the text but has a jarbled(to me) footer and header.
I'm doing something wrong of course.
Thanks for your help.
LNMEgo
(btw, I did post this on the forums at sun, but didn't get a response.
so, yes I did cross post, but that forum is pretty unresponsive.
thanks)
any rate, I'd like to get the text out of it. (It is some text with
infrequent markup.
I'm using Xalan and Java. getNodeValue() returns null, and
isTextNode(n) returns false. Here is the only code I've been able to
use to get the text out:
ByteArrayOutputStream baotc = new ByteArrayOutputStream();
StreamResult out = new StreamResult(new OutputStreamWriter(baotc));
serializer.transform(new DOMSource(n), out);
String tt = baotc.toString();
It actually gives the text but has a jarbled(to me) footer and header.
I'm doing something wrong of course.
Thanks for your help.
LNMEgo
(btw, I did post this on the forums at sun, but didn't get a response.
so, yes I did cross post, but that forum is pretty unresponsive.
thanks)