0
什麼是對象模型XPathFactory
?JAXP XpathFactory對象模型
重要的是什麼?
它會影響應用程序的性能嗎?
的規範和javadoc聲稱,默認對象模型如下:
DEFAULT_OBJECT_MODEL_URI = "http://java.sun.com/jaxp/xpath/dom"
但在saxon documentation我發現別人
- http://jdom.org/jaxp/xpath/jdom
- http://www.xom.nu/jaxp/xpath/xom
- http://www.dom4j.org/jaxp/xpath/dom4j
- http://saxon.sf.net/jaxp/xpath/om
對象模型被選擇爲以下:
String objectModel = "http://java.sun.com/jaxp/xpath/dom";
XPathFactory xpathFactory = XPathFactory.newInstance(objectModel);
XPath xpath = xpathFactory.newXPath();