Class

kantan.xpath

RemoteXmlSource

Related Doc: package xpath

Permalink

final case class RemoteXmlSource[A](toURL: (A) ⇒ ParseResult[URL], retry: RetryStrategy, headers: Map[String, String])(implicit parser: XmlParser) extends XmlSource[A] with Product with Serializable

XmlSource implementation anything that can be turned into a java.io.URL.

The main purpose here is to allow application developers to set their own HTTP headers: when scraping websites, it's typically necessary to change the default user agent to something a bit more browser-like.

Linear Supertypes
Serializable, Product, Equals, XmlSource[A], Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RemoteXmlSource
  2. Serializable
  3. Product
  4. Equals
  5. XmlSource
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RemoteXmlSource(toURL: (A) ⇒ ParseResult[URL], retry: RetryStrategy, headers: Map[String, String])(implicit parser: XmlParser)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def asNode(a: A): ParseResult[Node]

    Permalink

    Turns the specified value into a Node.

    Turns the specified value into a Node.

    Results are wrapped in a ParseResult, which makes this method safe. For an unsafe alternative, see asUnsafeNode.

    Definition Classes
    RemoteXmlSourceXmlSource
  6. def asUnsafeNode(a: A): Node

    Permalink

    Turns the specified value into a Node.

    Turns the specified value into a Node.

    This method is unsafe - it will throw an exception should any error occur during parsing. For a safe alternative, see asNode.

    Definition Classes
    XmlSource
    Annotations
    @SuppressWarnings()
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def contramap[B](f: (B) ⇒ A): RemoteXmlSource[B]

    Permalink

    Turns an XmlSource[A] into an XmlSource[B].

    Turns an XmlSource[A] into an XmlSource[B].

    Definition Classes
    RemoteXmlSourceXmlSource
    See also

    contramapResult.

  9. def contramapResult[AA <: A, B](f: (B) ⇒ ParseResult[AA]): RemoteXmlSource[B]

    Permalink

    Turns an XmlSource[A] into an XmlSource[B].

    Turns an XmlSource[A] into an XmlSource[B].

    Definition Classes
    RemoteXmlSourceXmlSource
    See also

    contramap

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def eval[B](a: A, expr: Query[DecodeResult[B]]): ReadResult[B]

    Permalink

    Evaluates the specified XPath expression against specified value.

    Evaluates the specified XPath expression against specified value.

    Definition Classes
    XmlSource
  12. def eval[B](a: A, expr: XPathExpression)(implicit arg0: Compiler[B]): XPathResult[B]

    Permalink

    Compiles the specified XPath expression and evaluates it against the specified value.

    Compiles the specified XPath expression and evaluates it against the specified value.

    Definition Classes
    XmlSource
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. val headers: Map[String, String]

    Permalink
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. val retry: RetryStrategy

    Permalink
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. val toURL: (A) ⇒ ParseResult[URL]

    Permalink
  23. def unsafeEval[B](a: A, expr: Query[DecodeResult[B]]): B

    Permalink

    Evaluates the specified XPath expression against specified value.

    Evaluates the specified XPath expression against specified value.

    Definition Classes
    XmlSource
    Annotations
    @SuppressWarnings()
  24. def unsafeEval[B](a: A, expr: XPathExpression)(implicit arg0: Compiler[B]): B

    Permalink

    Compiles the specified XPath expression and evaluates it against specified value.

    Compiles the specified XPath expression and evaluates it against specified value.

    Definition Classes
    XmlSource
    Annotations
    @SuppressWarnings()
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def withHeader(name: String, value: String): RemoteXmlSource[A]

    Permalink

    Sets the specified header to the specified value.

  29. def withRetry(strategy: RetryStrategy): RemoteXmlSource[A]

    Permalink
  30. def withUserAgent(value: String): RemoteXmlSource[A]

    Permalink

    Sets the user-agent to use whenever connecting to a URL.

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from XmlSource[A]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped