eu.cdevreeze.yaidom

resolved

package resolved

This package contains element representations that can be compared for (some notion of "value") equality, unlike normal yaidom nodes. That notion of equality is simple to understand, but "naive". The user is of the API must take control over what is compared for equality.

See eu.cdevreeze.yaidom.resolved.Node for why this package is named resolved.

The most important difference with normal Elems is that qualified names do not occur, but only expanded (element and attribute) names. This reminds of James Clark notation for XML trees and expanded names, where qualified names are absent.

Moreover, the only nodes in this package are element and text nodes.

Below follows a simple example query, using the uniform query API:

// Note the import of package resolved, and not of its members. That is indeed a best practice!
import eu.cdevreeze.yaidom.resolved

val resolvedBookstoreElem = resolved.Elem(bookstoreElem)

val scalaBookAuthors =
  for {
    bookElem <- resolvedBookstoreElem \ EName("{http://bookstore/book}Book")
    if (bookElem \@ EName("ISBN")) == Some("978-0981531649")
    authorElem <- bookElem \\ EName("{http://bookstore/author}Author")
  } yield authorElem

The query for Scala book authors would have been exactly the same if normal Elems had been used instead of resolved.Elems (replacing resolvedBookstoreElem by bookstoreElem)!

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. resolved
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. final case class Elem(resolvedName: EName, resolvedAttributes: Map[EName, String], children: IndexedSeq[Node]) extends Node with resolved.ResolvedNodes.Elem with ClarkElemLike with UpdatableElemLike with TransformableElemLike with Product with Serializable

    Element as abstract data type.

  2. sealed trait Node extends resolved.ResolvedNodes.Node with Immutable

    Immutable "resolved" Node.

  3. final case class Text(text: String) extends Node with resolved.ResolvedNodes.Text with Product with Serializable

Value Members

  1. object Elem extends Serializable

  2. object Node

  3. object ResolvedNodes

    Abstract node trait hierarchy.

  4. object Text extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped