Cannot find TinyElementImpl
Added by Anonymous about 19 years ago
Legacy ID: #3420205 Legacy Poster: Daniela (danny_kay)
Hi, everyone, I am working with Eclipse on a project that - among other things - uses an XQuery on a web page. Now that returns a List full of TinyElementImpl: Tidy tidy = new Tidy(); tidy.setQuiet(true); tidy.setShowWarnings(false); URL targetURL = new URL("http://finance.yahoo.com/q?s=IBM"); String url = "http://finance.yahoo.com/q?s=IBM"; InputStream inputStream = targetURL.openStream(); Document tidyDOM = tidy.parseDOM(inputStream, null); System.out.println(printDOMDocument(tidyDOM)); String query = "<table>" + " {" + " for $d in //td" + " where contains($d/text()[1], "Last Trade")" + " return <tr><td> { data($d/following-sibling::td) } </td></tr>" + "}" + "</table>"; Configuration configuration = new Configuration(); StaticQueryContext staticQueryContext = new StaticQueryContext(configuration); XQueryExpression xe = staticQueryContext.compileQuery(query); DynamicQueryContext dqc = new DynamicQueryContext(configuration); dqc.setContextNode(new DocumentWrapper(tidyDOM, url, configuration)); List result = xe.evaluate(dqc); If I walk through the List "result" and use getClass() on the item(s) contained, the result is class net.sf.saxon.tinytree.TinyElementImpl But if I try to import TinyElementImpl, Eclipse cannot find it. All other Tiny*Impl are there, just not that. Anybody ever have that problem? Daniela
Replies (2)
RE: Cannot find TinyElementImpl - Added by Anonymous about 19 years ago
Legacy ID: #3420234 Legacy Poster: Michael Kay (mhkay)
TinyElementImpl is an internal implementation class. It implements the public interface NodeInfo, which should contain all the methods that you need. Cast the returned object to net.sf.saxon.om.NodeInfo and work from there. Michael Kay
RE: Cannot find TinyElementImpl - Added by Anonymous about 19 years ago
Legacy ID: #3420243 Legacy Poster: Daniela (danny_kay)
Thank you so much for your help! Daniela
Please register to reply