Class/Object

eu.cdevreeze.yaidom.simple

Document

Related Docs: object Document | package simple

Permalink

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, 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[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
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

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. final 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. final 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 updated(path: Path, newElem: Elem): Document

    Permalink

    Returns updated(path) { e => newElem }

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

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

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

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

  38. val xmlDeclarationOption: Option[XmlDeclaration]

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from Immutable

Inherited from DocumentApi[Elem]

Inherited from AnyRef

Inherited from Any

Ungrouped