eu.cdevreeze.yaidom

docaware

package docaware

This package contains element representations that contain the "context" of the element, including the URI of the containing document. In other words, this package contains element representations like indexed.Elem, except that the document URI is stored as well in each element.

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

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

val docawareBookstoreElem = docaware.Elem(bookstoreElem)

val scalaBookAuthors =
  for {
    bookElem <- docawareBookstoreElem \ 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 docaware.Elems (replacing docawareBookstoreElem by bookstoreElem)!

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

Type Members

  1. final class Document extends DocumentApi[Elem] with Immutable

    Document, containing a "document-aware" document element.

  2. final class Elem extends ScopedElemLike[Elem] with IsNavigable[Elem] with Immutable

    An element just like indexed.Elem, but storing the URI of the containing document as well.

    An element just like indexed.Elem, but storing the URI of the containing document as well. See eu.cdevreeze.yaidom.indexed.Elem for more details. These details apply to eu.cdevreeze.yaidom.docaware.Elem too, except that additionally the document URI is stored.

Value Members

  1. object Document

  2. object Elem

Inherited from AnyRef

Inherited from Any

Ungrouped