Library
core
classes
Core Src Diff Lawdiff.comparableel

Lawtext core references / core/src/diff/lawDiff / ComparableEL

Class: ComparableEL

core/src/diff/lawDiff.ComparableEL

JsonEL: a tree structure that represents simplified structure of XML. A JsonEL object corresponds to an XML element.

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ComparableEL(el, parent?, openIndex?): ComparableEL

Parameters

NameTypeDefault value
elstring | JsonELundefined
parent?ComparableELundefined
openIndexnumber0

Returns

ComparableEL

Defined in

core/src/diff/lawDiff.ts:160 (opens in a new tab)

Properties

attr

attr: Object = {}

The attributes of the element

Index signature

▪ [key: string]: string | undefined

Implementation of

JsonEL.attr

Defined in

core/src/diff/lawDiff.ts:152 (opens in a new tab)


children

children: ComparableEL[] = []

The children of the element

Implementation of

JsonEL.children

Defined in

core/src/diff/lawDiff.ts:153 (opens in a new tab)


closeIndex

closeIndex: number

Defined in

core/src/diff/lawDiff.ts:155 (opens in a new tab)


nextIndex

nextIndex: number

Defined in

core/src/diff/lawDiff.ts:156 (opens in a new tab)


openIndex

openIndex: number

Defined in

core/src/diff/lawDiff.ts:154 (opens in a new tab)


parent

Optional parent: ComparableEL

Defined in

core/src/diff/lawDiff.ts:157 (opens in a new tab)


tag

tag: string = ""

The tag name of the element

Implementation of

JsonEL.tag

Defined in

core/src/diff/lawDiff.ts:151 (opens in a new tab)


textCache

textCache: null | string = null

Defined in

core/src/diff/lawDiff.ts:158 (opens in a new tab)

Accessors

text

get text(): string

Returns

string

Defined in

core/src/diff/lawDiff.ts:185 (opens in a new tab)

Methods

allList

allList(): IterableIterator<[ComparableEL, TagType]>

Returns

IterableIterator<[ComparableEL, TagType]>

Defined in

core/src/diff/lawDiff.ts:192 (opens in a new tab)


getXPath

getXPath(): string

Returns

string

Defined in

core/src/diff/lawDiff.ts:204 (opens in a new tab)