XPathConstants

  • XPathConstants provides constants for XPath data types (boolean, node, nodeset, number, and string) that map to corresponding Java types.

  • These constants are used to specify the expected result type when evaluating XPath expressions.

  • The DOM_OBJECT_MODEL constant defines the URI for the DOM object model used in the context of XPath.

  • XPathConstants is part of the Java API for XML Processing (JAXP) and enables interaction with XML documents using XPath.

public class XPathConstants extends Object

XPath constants.

Constant Summary

String DOM_OBJECT_MODEL

The URI for the DOM object model, "http://java.sun.com/jaxp/xpath/dom".

Field Summary

public static final QName BOOLEAN

The XPath 1.0 boolean data type.

public static final QName NODE

The XPath 1.0 NodeSet data type.

public static final QName NODESET

The XPath 1.0 NodeSet data type.

public static final QName NUMBER

The XPath 1.0 number data type.

public static final QName STRING

The XPath 1.0 string data type.

Inherited Method Summary

Constants

public static final String DOM_OBJECT_MODEL

The URI for the DOM object model, "http://java.sun.com/jaxp/xpath/dom".

Constant Value: "http://java.sun.com/jaxp/xpath/dom"

Fields

public static final QName BOOLEAN

The XPath 1.0 boolean data type.

Maps to Java Boolean.

public static final QName NODE

The XPath 1.0 NodeSet data type.

Maps to Java Node.

public static final QName NODESET

The XPath 1.0 NodeSet data type.

Maps to Java NodeList.

public static final QName NUMBER

The XPath 1.0 number data type.

Maps to Java Double.

public static final QName STRING

The XPath 1.0 string data type.

Maps to Java String.