Library
core
src
diff
lawDiff
classes
Comparableel

Lawtext core referencesDocs


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

Class: ComparableEL

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

Implements

Constructors

new ComparableEL()

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

Parameters

el: string | JsonEL

parent?: ComparableEL

openIndex?: number = 0

Returns

ComparableEL

Defined in

core/src/diff/lawDiff.ts:161 (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:153 (opens in a new tab)


children

children: ComparableEL[] = []

The children of the element

Implementation of

JsonEL.children

Defined in

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


closeIndex

closeIndex: number

Defined in

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


nextIndex

nextIndex: number

Defined in

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


openIndex

openIndex: number

Defined in

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


parent?

optional parent: ComparableEL

Defined in

core/src/diff/lawDiff.ts:158 (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:152 (opens in a new tab)


textCache

textCache: null | string = null

Defined in

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

Accessors

text

get text(): string

Returns

string

Defined in

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

Methods

allList()

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

Returns

IterableIterator<[ComparableEL, TagType]>

Defined in

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


getXPath()

getXPath(): string

Returns

string

Defined in

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