KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > excalibur > xml > xpath > XPathProcessor


1 /*****************************************************************************
2  * Copyright (C) The Apache Software Foundation. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * This software is published under the terms of the Apache Software License *
5  * version 1.1, a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  *****************************************************************************/

8 package org.apache.avalon.excalibur.xml.xpath;
9
10 import org.w3c.dom.Node JavaDoc;
11 import org.w3c.dom.NodeList JavaDoc;
12 import org.apache.avalon.framework.component.Component;
13
14 /**
15  * This is the interface of the XPath processor.
16  *
17  * @author <a HREF="mailto:dims@yahoo.com">Davanum Srinivas</a>
18  * @version CVS $Revision: 1.5 $ $Date: 2001/12/11 09:53:32 $ $Author: jefft $
19  */

20 public interface XPathProcessor extends Component
21 {
22     /**
23      * The role implemented by an <code>XSLTProcessor</code>.
24      */

25     String JavaDoc ROLE = "org.apache.avalon.excalibur.xml.xpath.XPathProcessor";
26
27     /**
28      * Use an XPath string to select a single node. XPath namespace
29      * prefixes are resolved from the context node, which may not
30      * be what you want (see the next method).
31      *
32      * @param contextNode The node to start searching from.
33      * @param str A valid XPath string.
34      * @return The first node found that matches the XPath, or null.
35      */

36     Node JavaDoc selectSingleNode(Node JavaDoc contextNode, String JavaDoc str);
37
38     /**
39      * Use an XPath string to select a nodelist.
40      * XPath namespace prefixes are resolved from the contextNode.
41      *
42      * @param contextNode The node to start searching from.
43      * @param str A valid XPath string.
44      * @return A List, should never be null.
45      */

46     NodeList JavaDoc selectNodeList(Node JavaDoc contextNode, String JavaDoc str);
47 }
48
Popular Tags