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

com.github.loyada.dollarx.PathOperators.scala Maven / Gradle / Ivy

package com.github.loyada.dollarx


object PathOperators {

  def not(path: Path): Path = {
    if (path.getXPath.isEmpty) throw new IllegalArgumentException()
    new Path(xpath = Some(s"*[not(self::${ElementPropertiesHelper.transformXpathToCorrectAxis(path).get})]"),
      underlyingSource = path.getUnderlyingSource,
      xpathExplanation = Some(String.format("anything except (%s)", path)),
      alternateXpath = Some(s"*[not(self::${path.getAlternateXPath})]"))
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy