API / geotoolkit / report / parsers / TextNodeParser / TextNodeParser
parsers.TextNodeParser.TextNodeParser
↳
TextNodeParser
Constructors
Methods
Constructors
• new TextNodeParser(nodeName?, nodeType?)
| Name | Type |
|---|---|
Optional nodeName | string |
Optional nodeType | number |
NodeParser.constructor
Methods
▸ addElements(childElements, context): ParserContext
add child elements
| Name | Type |
|---|---|
childElements | ParserContext[] |
context | ParserContext |
▸ createElement(node, context): ParserContext
Create element associated with node
| Name | Type | Description |
|---|---|---|
node | Element | Node | |
context | ParserContext | The parsing context to be used to parse the node |
▸ getAttribute(node, attrName, defaultValue?): string
Extracts requested attribute from provided node
| Name | Type | Description |
|---|---|---|
node | Element | Node | XML node |
attrName | string | The name of attribute to obtain |
Optional defaultValue | string | default value |
string
Value of the attribute
▸ getClassName(): string
string
▸ getName(): string
Return parser name
string
▸ getType(): number
Return node type
number
▸ Protected parseAttributes(node, context): ParserContext
| Name | Type | Description |
|---|---|---|
node | Element | Node | node to parse |
context | ParserContext | parser context |
▸ parseElement(node, context): ParserContext
| Name | Type | Description |
|---|---|---|
node | Element | Node | node |
context | ParserContext | context |
▸ Protected tryParseArray(value): any
Parse string into array of objects, assuming that string value looks like "[value,value,value]" for example "[10,20,30,75.8999,36]" or "[x:10;y:20,x:15;y:45]"
| Name | Type | Description |
|---|---|---|
value | string | value |
any
▸ Protected tryParseJSON(value): object
Parse string in to object, assuming that string value looks like "name:value;name:value" for example
| Name | Type | Description |
|---|---|---|
value | string | value |
object
▸ Protected tryParseValue(value): string | number | boolean
Try parse value to avoid converting it later in run-time
| Name | Type | Description |
|---|---|---|
value | string | value |
string | number | boolean
▸ Static getAttribute(node, attrName, defaultValue?): string
Extracts requested attribute from provided node
| Name | Type | Description |
|---|---|---|
node | Element | Node | XML node |
attrName | string | The name of attribute to obtain |
Optional defaultValue | string | default value |
string
Value of the attribute
▸ Static tryParseArray(value): any
Parse string into array of objects, assuming that string value looks like "[value,value,value]" for example "[10,20,30,75.8999,36]" or "[x:10;y:20,x:15;y:45]"
| Name | Type | Description |
|---|---|---|
value | string | value |
any
▸ Static tryParseJSON(value): object
Parse string in to object, assuming that string value looks like "name:value;name:value" for example
| Name | Type | Description |
|---|---|---|
value | string | value |
object
▸ Static tryParseValue(value): string | number | boolean
Try parse value to avoid converting it later in run-time
| Name | Type | Description |
|---|---|---|
value | string | value |
string | number | boolean