I'm trying to use Camel to extract only the "//title" tag in a directory of xml files. This is all on local disk. The code runs sucessfully without an error but there was no directory created. Any ideas whats wrong?

import org.apache.camel.builder.RouteBuilder
import org.apache.camel.impl.DefaultCamelContext
class xmlFilter extends RouteBuilder {
  def configure {
    val inputDir = "file://~/src/rw/data/xml/original"
    val outputDir = "file:title_only"

    //apache camel dsl
    from(inputDir).filter().xpath("//title").to(outputDir)
  }
}

object CamelExample{
  def run{
    val context = new DefaultCamelContext()
    context.addRoutes(new xmlFilter())
    context.start()
  }
}

CamelExample.run

Reply via email to