All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.codemodder.XPathStreamProcessor Maven / Gradle / Ivy

There is a newer version: 0.97.9
Show newest version
package io.codemodder;

import java.io.IOException;
import java.nio.file.Path;
import java.util.Optional;
import javax.xml.stream.XMLStreamException;
import org.xml.sax.SAXException;

/** Performs configurable actions on nodes that match XPath expressions. */
public interface XPathStreamProcessor {

  /**
   * Scan the given XML file for nodes that match the given XPath expression and hand them off to
   * the given handler.
   *
   * @return an {@link XPathStreamProcessChange} if the file was changed, otherwise empty
   */
  Optional process(
      Path path, String xpathExpression, XPathStreamEventHandler handler)
      throws SAXException, IOException, XMLStreamException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy