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

io.idml.jsoup.ParseHtmlFunction.scala Maven / Gradle / Ivy

package io.idml.jsoup

import io.idml.ast.{IdmlFunction, Pipeline}
import io.idml.datanodes.IString
import io.idml.{IdmlContext, InvalidCaller}

object ParseHtmlFunction extends IdmlFunction {
  override def name: String = "parseHtml"

  override def invoke(ctx: IdmlContext): Unit = {
    ctx.cursor = ctx.cursor match {
      case IString(str) =>
        IdmlJsoup.parseHtml(str)
      case _ =>
        InvalidCaller
    }
  }

  override def args: List[Pipeline] = Nil
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy