kantan.xpath icon indicating copy to clipboard operation
kantan.xpath copied to clipboard

Can't decode the document root as org.w3c.dom.Element

Open nigredo-tori opened this issue 4 years ago • 0 comments

scala> "<foo/>".evalXPath[Element](xp".")
res0: kantan.xpath.XPathResult[org.w3c.dom.Element] = Left(TypeError: class com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl cannot be cast to class org.w3c.dom.Element (com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl and org.w3c.dom.Element are in module java.xml of loader 'bootstrap'))

NodeDecoder[Element] should probably have a special case for Document.

nigredo-tori avatar Dec 18 '20 10:12 nigredo-tori