Packages

trait Element extends AnyRef

A representation of a HTML DOM element.

Elements can be obtained by obtaining Document instances (for example, through a net.ruippeixotog.scalascraper.browser.Browser) and using one of its several methods. They provide several methods for traversing and retrieving infomation from the DOM of the page in which they are.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Element
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. abstract type ThisType <: Element

    The concrete type of this Element.

    The concrete type of this Element. Should be defined in each concrete implementation as its own type.

Abstract Value Members

  1. abstract def attr(name: String): String

    Returns the value associated with an attribute of this element.

    Returns the value associated with an attribute of this element.

    name

    the name of the attribute

    returns

    the value associated with the given attribute.

  2. abstract def attrs: Map[String, String]

    The map of attributes of this element.

  3. abstract def childNodes: Iterable[Node]

    The list of child nodes of this element.

  4. abstract def children: Iterable[ThisType]

    The list of children of this element.

  5. abstract def hasAttr(name: String): Boolean

    Checks if an attribute is defined in this element.

    Checks if an attribute is defined in this element.

    name

    the name of the attribute

    returns

    true if the attribute is defined, false otherwise

  6. abstract def innerHtml: String

    The HTML representation of the content inside this element as a string.

  7. abstract def outerHtml: String

    The HTML representation of this element as a string.

  8. abstract def ownText: String

    The text content owned by this element only, i.e.

    The text content owned by this element only, i.e. without text inside children.

  9. abstract def parent: Option[ThisType]

    The element of this element.

  10. abstract def select(query: String): ElementQuery[ThisType]

    Executes a query on this element using a CSS selector.

    Executes a query on this element using a CSS selector.

    query

    the CSS selector used to select elements to be returned

    returns

    an ElementQuery instance representing the sequence of resulting elements

  11. abstract def siblingNodes: Iterable[Node]

    The list of sibling nodes of this element.

  12. abstract def siblings: Iterable[ThisType]

    The list of siblings of this element.

  13. abstract def tagName: String

    The tag name of this element.

  14. abstract def text: String

    The text content inside this element and any child nodes.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped