Hi, Any help on this question? Thanks.
On Jan 14, 2008 3:58 PM, Hacking Bear <[EMAIL PROTECTED]> wrote: > Hi, > > I would expect this question be answered many times or on the XML beans > website, but I can't find the answers. > > Essentially, I just try to convert an XmlObject to a DOM Element > > Node node = xmlbean.getDomNode (); // works > Element elem = (Element) node; // failed > > with error java.lang.ClassCastException: > org.apache.xmlbeans.impl.store.Xobj$DocumentFragXobj > > It also seems that cursor methods like toFirstChild() would return an > Element but I do not necessary know the order of the current element in its > parent. > > Any idea on a simple and elegant way to get the Element? > > Thanks >