java - JAXP XpathFactory Object model -


What is the object model in XPathFactory ?

Is it important for that?

Does this affect performance of the application?

The device and the claims that the default object model is:

DEFAULT_OBJECT_MODEL_URI = "http://java.sun.com/jaxp/xpath/dom"

  • Ul>

    Object model is selected below:

      string objectModel = "http://java.sun.com/jaxp/xpath/dom"; XPathFactory xpathFactory = XPathFactory.newInstance (objectModel); XPath xpath = xpathFactory.newXPath ();  

    JAXP DEFAULT_OBJECT_MODEL_URI provides a default implementation that is w3c DOM. If your classpath has jdom, you can specify that XPathFactory uses the JDOM document object model. View the JAXP XPath example

    to see the JDOM2 XPath example and see the link.

    Comments