Class XPathFind

java.lang.Object
edu.umd.cs.findbugs.xml.XPathFind

public abstract class XPathFind extends Object
Find nodes in a dom4j tree that match a particular XPath expression. The main() driver prints out information about matching nodes in an XML document.

For example, to find the list of non-disabled detectors in a FindBugs plugin descriptor, you can use the expression

/FindbugsPlugin/Detector[boolean(@disabled)=false()]/@class
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.dom4j.Document
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    XPathFind(org.dom4j.Document document)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    find(String xpath)
     
    static void
    main(String[] argv)
     
    protected abstract void
    match(org.dom4j.Node node)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • document

      private final org.dom4j.Document document
  • Constructor Details

    • XPathFind

      protected XPathFind(org.dom4j.Document document)
  • Method Details

    • find

      public void find(String xpath)
    • match

      protected abstract void match(org.dom4j.Node node)
    • main

      public static void main(String[] argv) throws Exception
      Throws:
      Exception