Class/Object

eu.cdevreeze.yaidom.simple

Document

Related Docs: object Document | package simple

Permalink

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()
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
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Document(uriOption: Option[URI], xmlDeclarationOption: Option[XmlDeclaration], children: IndexedSeq[CanBeDocumentChild])

    Permalink

Type Members

  1. type DocElemType = Elem

    Permalink

    The type of the document element.

    The type of the document element.

    Definition Classes
    DocumentAnyDocumentApi
  2. type ThisDoc = Document

    Permalink

    The document type itself.

    The document type itself. It must be restricted to a sub-type of the document API trait in question.

    Concrete document classes will restrict this type to that document class itself.

    Definition Classes
    DocumentDocumentApiAnyDocumentApi

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def allComments: IndexedSeq[Comment]

    Permalink

    Expensive method to obtain all comments, throughout the tree

  5. def allProcessingInstructions: IndexedSeq[ProcessingInstruction]

    Permalink

    Expensive method to obtain all processing instructions, throughout the tree

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. val children: IndexedSeq[CanBeDocumentChild]

    Permalink
  8. def clone(): AnyRef

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

    Permalink
  10. val documentElement: Elem

    Permalink

    Returns the document element

    Returns the document element

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  20. def processingInstructions: IndexedSeq[ProcessingInstruction]

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

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

    Permalink

    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. def toTreeRepr(): String

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

    Permalink

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

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

    Permalink

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

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

    Permalink

    Returns withDocumentElement(f(documentElement)).

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

  35. val uriOption: Option[URI]

    Permalink

    Returns the optional document URI, wrapped in an Option

    Returns the optional document URI, wrapped in an Option

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

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

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

  42. val xmlDeclarationOption: Option[XmlDeclaration]

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from Immutable

Inherited from DocumentApi

Inherited from AnyDocumentApi

Inherited from AnyRef

Inherited from Any

Ungrouped