Class XPathLocation

  • All Implemented Interfaces:
    java.io.Serializable, Location

    public class XPathLocation
    extends java.lang.Object
    implements Location, java.io.Serializable
    A very simple XPath location class for use with the ValidationException. This class only supports the parent "/" operator and element names.
    Version:
    $Revision: 8145 $ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $
    Author:
    Keith Visco
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      XPathLocation()
      Creates a default XPathLocation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAttribute​(java.lang.String name)
      Adds an attribute to the XPath location.
      void addChild​(java.lang.String name)
      Adds the given element name as a child of the current path.
      void addParent​(java.lang.String name)
      Adds the name as a parent of the current path.
      java.lang.String toString()
      Returns the String representation of this XPathLocation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • XPathLocation

        public XPathLocation()
        Creates a default XPathLocation.
    • Method Detail

      • addAttribute

        public void addAttribute​(java.lang.String name)
        Adds an attribute to the XPath location.
        Parameters:
        name - the name of the attribute
      • addChild

        public void addChild​(java.lang.String name)
        Adds the given element name as a child of the current path.
        Parameters:
        name - the name to add as a child
      • addParent

        public void addParent​(java.lang.String name)
        Adds the name as a parent of the current path.
        Parameters:
        name - the name to add as a parent
      • toString

        public java.lang.String toString()
        Returns the String representation of this XPathLocation.
        Specified by:
        toString in interface Location
        Overrides:
        toString in class java.lang.Object
        Returns:
        the String representation of this XPathLocation.