Class XMLTools

  extended by com.vividsolutions.wms.util.XMLTools

public class XMLTools
extends java.lang.Object

Provides some simple XML utilities for the WMS implementation to use.

Chris Hodgson

Constructor Summary
Method Summary
static void printNode(org.w3c.dom.Node n, java.lang.String prefix)
          Recursively prints out the DOM structure underneath a Node.
static org.w3c.dom.Node simpleXPath(org.w3c.dom.Node parent, java.lang.String xpath)
          A very simple XPath implementation.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public XMLTools()
Method Detail


public static void printNode(org.w3c.dom.Node n,
                             java.lang.String prefix)
Recursively prints out the DOM structure underneath a Node. The prefix parameter is used in the recursive call to indent properly, but it can also be used in the initial call to provide an initial prefix or indentation.

n - the Node to print out
prefix - the prefix to use


public static org.w3c.dom.Node simpleXPath(org.w3c.dom.Node parent,
                                           java.lang.String xpath)
A very simple XPath implementation. Recursively drills down into the DOM tree, starting at the given parent Node, following the provided XPath. The XPath string is a slash-delimited list of element names to drill down into, the node with the last name in the list is returned

parent - the parent node to search into
xpath - the simplified XPath search string
the Node found at the end of the search, or null if the search failed to find the specified node.