Class Document

Create new document instance.

Constructor

class Document(type[, name], data[, tree][, src][, valueindex][, treevalueindex][, nodeindex])
Arguments:
  • type (string) – The document type. E.g. ‘xml’ or ‘json’
  • name (string) – The file name.
  • data (object) – A reference to the underlying document, the DOM.
  • tree (object) – The root node of the document tree. Use an instance of Node().
  • src (string) – The serialized version of this document, e.g. the XML markup code.
  • valueindex (object) – The object necessary to lookup node values. E.g. an instance of NodeHashIndex().
  • treevalueindex (object) – The object necessary to lookup the value of a whole subtree. E.g. an instance of TreeHashIndex().
  • nodeindex (object) – The object necessary to resolve nodes relative to other nodes when generating and verifying context. Typically this should be an instance of DocumentOrderIndex().

Attributes

data

data

A reference to the underlying document, e.g. the DOMDocument object.

name

name

The file name

nodeindex

nodeindex

An object used to lookup nodes relative to other nodes along a specified axis. Typically in document order.

src

src

The serialized version of this document.

tree

tree

The root node of the document tree.

treevalueindex

treevalueindex

An object used to lookup the combined values of all nodes in a subtree.

type

type

The document type. E.g. ‘xml’ or ‘json’

valueindex

valueindex

An object used to lookup node values.

Table Of Contents

Previous topic

Class patch.Patch

Next topic

Class DeltaDocument