Java Doc for XPathResult.java in  » 6.0-JDK-Core » w3c » org » w3c » dom » xpath » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » w3c » org.w3c.dom.xpath 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.w3c.dom.xpath.XPathResult

XPathResult
public interface XPathResult (Code)
The XPathResult interface represents the result of the evaluation of an XPath 1.0 expression within the context of a particular node. Since evaluation of an XPath expression can result in various result types, this object makes it possible to discover and manipulate the type and value of the result.

See also the Document Object Model (DOM) Level 3 XPath Specification.



Field Summary
final public static  shortANY_TYPE
     This code does not represent a specific type.
final public static  shortANY_UNORDERED_NODE_TYPE
     The result is a node set as defined by and will be accessed as a single node, which may be nullif the node set is empty.
final public static  shortBOOLEAN_TYPE
     The result is a boolean as defined by .
final public static  shortFIRST_ORDERED_NODE_TYPE
     The result is a node set as defined by and will be accessed as a single node, which may be null if the node set is empty.
final public static  shortNUMBER_TYPE
     The result is a number as defined by .
final public static  shortORDERED_NODE_ITERATOR_TYPE
     The result is a node set as defined by that will be accessed iteratively, which will produce document-ordered nodes.
final public static  shortORDERED_NODE_SNAPSHOT_TYPE
     The result is a node set as defined by that will be accessed as a snapshot list of nodes that will be in original document order.
final public static  shortSTRING_TYPE
     The result is a string as defined by .
final public static  shortUNORDERED_NODE_ITERATOR_TYPE
     The result is a node set as defined by that will be accessed iteratively, which may not produce nodes in a particular order.
final public static  shortUNORDERED_NODE_SNAPSHOT_TYPE
     The result is a node set as defined by that will be accessed as a snapshot list of nodes that may not be in a particular order.


Method Summary
public  booleangetBooleanValue()
     The value of this boolean result.
public  booleangetInvalidIteratorState()
     Signifies that the iterator has become invalid.
public  doublegetNumberValue()
     The value of this number result.
public  shortgetResultType()
     A code representing the type of this result, as defined by the type constants.
public  NodegetSingleNodeValue()
     The value of this single node result, which may be null.
public  intgetSnapshotLength()
     The number of nodes in the result snapshot.
public  StringgetStringValue()
     The value of this string result.
public  NodeiterateNext()
     Iterates and returns the next node from the node set or nullif there are no more nodes.
public  NodesnapshotItem(int index)
     Returns the indexth item in the snapshot collection.

Field Detail
ANY_TYPE
final public static short ANY_TYPE(Code)
This code does not represent a specific type. An evaluation of an XPath expression will never produce this type. If this type is requested, then the evaluation returns whatever type naturally results from evaluation of the expression.
If the natural result is a node set when ANY_TYPE was requested, then UNORDERED_NODE_ITERATOR_TYPE is always the resulting type. Any other representation of a node set must be explicitly requested.



ANY_UNORDERED_NODE_TYPE
final public static short ANY_UNORDERED_NODE_TYPE(Code)
The result is a node set as defined by and will be accessed as a single node, which may be nullif the node set is empty. Document modification does not invalidate the node, but may mean that the result node no longer corresponds to the current document. This is a convenience that permits optimization since the implementation can stop once any node in the in the resulting set has been found.
If there are more than one node in the actual result, the single node returned might not be the first in document order.



BOOLEAN_TYPE
final public static short BOOLEAN_TYPE(Code)
The result is a boolean as defined by . Document modification does not invalidate the boolean, but may mean that reevaluation would not yield the same boolean.



FIRST_ORDERED_NODE_TYPE
final public static short FIRST_ORDERED_NODE_TYPE(Code)
The result is a node set as defined by and will be accessed as a single node, which may be null if the node set is empty. Document modification does not invalidate the node, but may mean that the result node no longer corresponds to the current document. This is a convenience that permits optimization since the implementation can stop once the first node in document order of the resulting set has been found.
If there are more than one node in the actual result, the single node returned will be the first in document order.



NUMBER_TYPE
final public static short NUMBER_TYPE(Code)
The result is a number as defined by . Document modification does not invalidate the number, but may mean that reevaluation would not yield the same number.



ORDERED_NODE_ITERATOR_TYPE
final public static short ORDERED_NODE_ITERATOR_TYPE(Code)
The result is a node set as defined by that will be accessed iteratively, which will produce document-ordered nodes. Document modification invalidates the iteration.



ORDERED_NODE_SNAPSHOT_TYPE
final public static short ORDERED_NODE_SNAPSHOT_TYPE(Code)
The result is a node set as defined by that will be accessed as a snapshot list of nodes that will be in original document order. Document modification does not invalidate the snapshot but may mean that reevaluation would not yield the same snapshot and nodes in the snapshot may have been altered, moved, or removed from the document.



STRING_TYPE
final public static short STRING_TYPE(Code)
The result is a string as defined by . Document modification does not invalidate the string, but may mean that the string no longer corresponds to the current document.



UNORDERED_NODE_ITERATOR_TYPE
final public static short UNORDERED_NODE_ITERATOR_TYPE(Code)
The result is a node set as defined by that will be accessed iteratively, which may not produce nodes in a particular order. Document modification invalidates the iteration.
This is the default type returned if the result is a node set and ANY_TYPE is requested.



UNORDERED_NODE_SNAPSHOT_TYPE
final public static short UNORDERED_NODE_SNAPSHOT_TYPE(Code)
The result is a node set as defined by that will be accessed as a snapshot list of nodes that may not be in a particular order. Document modification does not invalidate the snapshot but may mean that reevaluation would not yield the same snapshot and nodes in the snapshot may have been altered, moved, or removed from the document.





Method Detail
getBooleanValue
public boolean getBooleanValue() throws XPathException(Code)
The value of this boolean result.
exception:
  XPathException - TYPE_ERR: raised if resultType is not BOOLEAN_TYPE.



getInvalidIteratorState
public boolean getInvalidIteratorState()(Code)
Signifies that the iterator has become invalid. True if resultType is UNORDERED_NODE_ITERATOR_TYPE or ORDERED_NODE_ITERATOR_TYPE and the document has been modified since this result was returned.



getNumberValue
public double getNumberValue() throws XPathException(Code)
The value of this number result. If the native double type of the DOM binding does not directly support the exact IEEE 754 result of the XPath expression, then it is up to the definition of the binding binding to specify how the XPath number is converted to the native binding number.
exception:
  XPathException - TYPE_ERR: raised if resultType is not NUMBER_TYPE.



getResultType
public short getResultType()(Code)
A code representing the type of this result, as defined by the type constants.



getSingleNodeValue
public Node getSingleNodeValue() throws XPathException(Code)
The value of this single node result, which may be null.
exception:
  XPathException - TYPE_ERR: raised if resultType is not ANY_UNORDERED_NODE_TYPE or FIRST_ORDERED_NODE_TYPE.



getSnapshotLength
public int getSnapshotLength() throws XPathException(Code)
The number of nodes in the result snapshot. Valid values for snapshotItem indices are 0 to snapshotLength-1 inclusive.
exception:
  XPathException - TYPE_ERR: raised if resultType is not UNORDERED_NODE_SNAPSHOT_TYPE or ORDERED_NODE_SNAPSHOT_TYPE.



getStringValue
public String getStringValue() throws XPathException(Code)
The value of this string result.
exception:
  XPathException - TYPE_ERR: raised if resultType is not STRING_TYPE.



iterateNext
public Node iterateNext() throws XPathException, DOMException(Code)
Iterates and returns the next node from the node set or nullif there are no more nodes. Returns the next node.
exception:
  XPathException - TYPE_ERR: raised if resultType is not UNORDERED_NODE_ITERATOR_TYPE or ORDERED_NODE_ITERATOR_TYPE.
exception:
  DOMException - INVALID_STATE_ERR: The document has been mutated since the result was returned.



snapshotItem
public Node snapshotItem(int index) throws XPathException(Code)
Returns the indexth item in the snapshot collection. If index is greater than or equal to the number of nodes in the list, this method returns null. Unlike the iterator result, the snapshot does not become invalid, but may not correspond to the current document if it is mutated.
Parameters:
  index - Index into the snapshot collection. The node at the indexth position in the NodeList, or null if that is not a valid index.
exception:
  XPathException - TYPE_ERR: raised if resultType is not UNORDERED_NODE_SNAPSHOT_TYPE or ORDERED_NODE_SNAPSHOT_TYPE.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.