eu.cdevreeze.yaidom.simple

Document

final class Document extends DocumentApi 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, an optional XML declaration, 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( 1L )
Linear Supertypes
Serializable, Serializable, Immutable, DocumentApi, AnyDocumentApi, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Document
  2. Serializable
  3. Serializable
  4. Immutable
  5. DocumentApi
  6. AnyDocumentApi
  7. AnyRef
  8. 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], xmlDeclarationOption: Option[XmlDeclaration], children: IndexedSeq[CanBeDocumentChild])

Type Members

  1. type DocElemType = Elem

    Definition Classes
    DocumentAnyDocumentApi
  2. abstract type ThisDoc <: ThisDocApi

    Definition Classes
    AnyDocumentApi
  3. abstract type ThisDocApi <: DocumentApi

    Definition Classes
    DocumentApiAnyDocumentApi

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def allComments: IndexedSeq[Comment]

    Expensive method to obtain all comments, throughout the tree

  7. def allProcessingInstructions: IndexedSeq[ProcessingInstruction]

    Expensive method to obtain all processing instructions, throughout the tree

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. val children: IndexedSeq[CanBeDocumentChild]

  10. def clone(): AnyRef

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

  12. val documentElement: Elem

    Returns the document element

    Returns the document element

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

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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  22. def processingInstructions: IndexedSeq[ProcessingInstruction]

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

    Definition Classes
    AnyRef
  24. 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
  25. def toTreeRepr(): String

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

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

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

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

  28. def updateElemOrSelf(path: Path, newElem: Elem): Document

    Returns withDocumentElement(this.documentElement.updateElemOrSelf(path, newElem))

  29. def updateElemOrSelf(path: Path)(f: (Elem) ⇒ Elem): Document

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

  30. def updateElemWithNodeSeq(path: Path, newNodes: IndexedSeq[Node]): Document

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

  31. def updateElemWithNodeSeq(path: Path)(f: (Elem) ⇒ IndexedSeq[Node]): Document

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

  32. def updateElemsOrSelf(paths: Set[Path])(f: (Elem, Path) ⇒ Elem): Document

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

  33. def updateElemsWithNodeSeq(paths: Set[Path])(f: (Elem, Path) ⇒ IndexedSeq[Node]): Document

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

  34. def updateTopmostElemsOrSelf(f: (Elem, Path) ⇒ Option[Elem]): Document

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

  35. def updateTopmostElemsWithNodeSeq(f: (Elem, Path) ⇒ Option[IndexedSeq[Node]]): Document

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

  36. 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
  37. final def wait(): Unit

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

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

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

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

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

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

  42. def withXmlDeclarationOption(newXmlDeclarationOption: Option[XmlDeclaration]): Document

    Creates a copy, but with the new xmlDeclarationOption passed as parameter newXmlDeclarationOption

  43. val xmlDeclarationOption: Option[XmlDeclaration]

Deprecated Value Members

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

    Annotations
    @deprecated
    Deprecated

    (Since version 1.5.0) Renamed to 'updateElemOrSelf'

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

    Annotations
    @deprecated
    Deprecated

    (Since version 1.5.0) Renamed to 'updateElemOrSelf'

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

    Annotations
    @deprecated
    Deprecated

    (Since version 1.5.0) Renamed to 'updateElemsOrSelf'

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

    Annotations
    @deprecated
    Deprecated

    (Since version 1.5.0) Renamed to 'updateElemWithNodeSeq'

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

    Annotations
    @deprecated
    Deprecated

    (Since version 1.5.0) Renamed to 'updateElemWithNodeSeq'

Inherited from Serializable

Inherited from Serializable

Inherited from Immutable

Inherited from DocumentApi

Inherited from AnyDocumentApi

Inherited from AnyRef

Inherited from Any

Ungrouped