All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.xmlOnline.xptr.Xptr

java.lang.Object
   |
   +----w3c.xmlOnline.xptr.Xptr

public class Xptr
extends Object
A class that implements TEI XPTR's. Create an instance of this class with Xptr("ROOT,CHILD(1)(ALL,*,DIR,*)") or any Xpointer string, than apply it to a node in an XML tree, with apply(node). The return value is an array of nodes that satisfy the query.

The current algorithms are not very efficient. Some work remains to be done here.

Version:
$Id: w3c.xmlOnline.xptr.Xptr.html,v 1.6 1997/06/09 22:26:38 bbos Exp $
Author:
Bert Bos

Constructor Index

 o Xptr(String)
Create an Xptr instance from the given string.

Method Index

 o apply(Node)
Apply an Xptr to a node in an XML tree, returning the array of Nodes that is addressed by this Xptr.
 o toString()
Return the string representation of the Xptr.

Constructors

 o Xptr
 public Xptr(String xptr) throws IllegalXptrException
Create an Xptr instance from the given string.

Returns:
new Xptr
Throws: IllegalXptrException
when the xptr is syntactically incorrect

Methods

 o apply
 public Node[] apply(Node here)
Apply an Xptr to a node in an XML tree, returning the array of Nodes that is addressed by this Xptr.

Parameters:
here - a starting node in the tree
Returns:
the array of matched nodes
 o toString
 public String toString()
Return the string representation of the Xptr.

Returns:
the string representation of the Xptr
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index