[Simple-support] Object obj = node.getSource() ?
Brought to you by:
niallg
|
From: Jaewoo L. <dl...@gm...> - 2013-01-11 09:54:58
|
Hi, Niall.
During using Converter,
I wanna make a SOURCE LIST of InputNode
So I am referencing "HackJobToGrabFloatingTextTest.java".
It's my code that I imitate HackJobToGrabFloatingTextTest.
import org.simpleframework.xml.convert.Converter;
import org.simpleframework.xml.stream.InputNode;
import org.simpleframework.xml.stream.OutputNode;
import org.w3c.dom.Element;
public class SXCMTSConverter implements Converter<SXCMTS>{
@Override
public SXCMTS read(InputNode node) throws Exception {
Object obj = node.getSource();
Element element = (Element)obj;
.....
}
.....
}
but Exception popped.
java.lang.ClassCastException:
com.sun.xml.internal.stream.events.StartElementEvent cannot be cast to
org.w3c.dom.Element
Is that code something wrong ?
Or wrong version of library? If wrong version, could you let me know right
version of that Library?
Or How do I make a list of Source List of Input Node?
Thanks for your help.
|