You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Paul Tomsic <pt...@yahoo.com> on 2006/08/18 21:10:19 UTC
XPathConstants to class mapper?
Is there some way to map classes to the XPathConstants
to inform javax.xml.xpath.XPath.evaluate() what type
of QName to accept?
for instance:
getFromXPath(String xpath, Node node, Boolean.class) {
XPath.evaluate(xpath, node,
XPathConstants.BOOLEAN)
}
?
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
Re: XPathConstants to class mapper?
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Paul Tomsic <pt...@yahoo.com> wrote on 08/18/2006 03:10:19 PM:
> Is there some way to map classes to the XPathConstants
> to inform javax.xml.xpath.XPath.evaluate() what type
> of QName to accept?
You could write a method which does the conversion. There's nothing in the
JAXP API which does that if that's what you're asking.
> for instance:
>
>
> getFromXPath(String xpath, Node node, Boolean.class) {
> XPath.evaluate(xpath, node,
> XPathConstants.BOOLEAN)
>
> }
>
> ?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org