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
Name | Type | Default value |
---|---|---|
el | string | JsonEL | undefined |
parent? | ComparableEL | undefined |
openIndex | number | 0 |
Returns
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
Defined in
core/src/diff/lawDiff.ts:152 (opens in a new tab)
children
• children: ComparableEL
[] = []
The children of the element
Implementation of
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
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