eu.cdevreeze.yaidom.simple

Document

final class Document extends DocumentApi[Elem] with Immutable with Serializable

Document. Although at first sight the document root element seems to be the root node, this is not entirely true. For example, there may be comments at top level, outside the document root element.

The document is itself not a Node. This choice has the following advantages:

A Document is constructed from an optional URI, a document element (as Elem), top-level processing instructions, if any, and top-level comments, if any.

Note that class Document does not have any query methods for Elem instances. In particular, the ElemApi does not apply to documents. Therefore, given a document, querying for elements (other than the document element itself) always goes via the document element.

Annotations
@SerialVersionUID()
Linear Supertypes
Serializable, Serializable, Immutable, DocumentApi[Elem], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Document
  2. Serializable
  3. Serializable
  4. Immutable
  5. DocumentApi
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Document(uriOption: Option[URI], documentElement: Elem, processingInstructions: IndexedSeq[ProcessingInstruction], comments: IndexedSeq[Comment])

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. def allComments: IndexedSeq[Comment]

    Expensive method to obtain all comments, throughout the tree

  5. def allProcessingInstructions: IndexedSeq[ProcessingInstruction]

    Expensive method to obtain all processing instructions, throughout the tree

  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def children: IndexedSeq[Node]

    Returns the immediate child nodes of the document.

    Returns the immediate child nodes of the document. That includes at least the document element, but top-level comments and processing instructions are also returned.

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val comments: IndexedSeq[Comment]

  10. val documentElement: Elem

    Returns the document element

    Returns the document element

    Definition Classes
    DocumentDocumentApi
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

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

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

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

    Definition Classes
    AnyRef
  20. val processingInstructions: IndexedSeq[ProcessingInstruction]

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

    Definition Classes
    AnyRef
  22. final def toString(): String

    Returns the tree representation string corresponding to this element, that is, toTreeRepr.

    Returns the tree representation string corresponding to this element, that is, toTreeRepr. Possibly expensive!

    Definition Classes
    Document → AnyRef → Any
  23. final def toTreeRepr(): String

  24. def transformElemsOrSelf(f: (Elem) ⇒ Elem): Document

    Returns withDocumentElement(this.documentElement.transformElemsOrSelf(f))

  25. def transformElemsToNodeSeq(f: (Elem) ⇒ IndexedSeq[Node]): Document

    Returns withDocumentElement(this.documentElement.transformElemsToNodeSeq(f))

  26. def updated(path: Path, newElem: Elem): Document

    Returns updated(path) { e => newElem }

  27. def updated(path: Path)(f: (Elem) ⇒ Elem): Document

    Returns withDocumentElement(this.documentElement.updated(path)(f)).

  28. def updatedAtPaths(paths: Set[Path])(f: (Elem, Path) ⇒ Elem): Document

    Returns withDocumentElement(this.documentElement.updatedAtPaths(paths)(f))

  29. def updatedWithNodeSeq(path: Path, newNodes: IndexedSeq[Node]): Document

    Returns withDocumentElement(this.documentElement.updatedWithNodeSeq(path, newNodes))

  30. def updatedWithNodeSeq(path: Path)(f: (Elem) ⇒ IndexedSeq[Node]): Document

    Returns withDocumentElement(this.documentElement.updatedWithNodeSeq(path)(f))

  31. val uriOption: Option[URI]

    Returns the optional document URI, wrapped in an Option

    Returns the optional document URI, wrapped in an Option

    Definition Classes
    DocumentDocumentApi
  32. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def withDocumentElement(newRoot: Elem): Document

    Creates a copy, but with the new documentElement passed as parameter newRoot

  36. def withUriOption(newUriOption: Option[URI]): Document

    Creates a copy, but with the new uriOption passed as parameter newUriOption

Inherited from Serializable

Inherited from Serializable

Inherited from Immutable

Inherited from DocumentApi[Elem]

Inherited from AnyRef

Inherited from Any

Ungrouped