output/xml
@hashml/hashml › Globals › "output/xml"
Index
Functions
Functions
escapeXML
▸ escapeXML(str
: string): string
Defined in output/xml.ts:51
Parameters:
Name | Type |
---|---|
str | string |
Returns: string
indent
▸ indent(line
: string, indentation
: number): string
Defined in output/xml.ts:61
Parameters:
Name | Type |
---|---|
line | string |
indentation | number |
Returns: string
propToXML
▸ propToXML(tag
: string, content
: Prop, indentation
: number): string
Defined in output/xml.ts:21
Parameters:
Name | Type |
---|---|
tag | string |
content | Prop |
indentation | number |
Returns: string
toXML
▸ toXML(root
: IRNode, indentation
: number): string
Defined in output/xml.ts:12
Convert an IR tree to an XML string.
Child nodes are indented with a tab \t
character.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
root | IRNode | - | Root of the IR tree |
indentation | number | 0 | Indentation level |
Returns: string
Tab-indented XML representation of the IR tree.
xmlTag
▸ xmlTag(name
: string, indentation
: number, ...children
: string[]): string
Defined in output/xml.ts:40
Parameters:
Name | Type |
---|---|
name | string |
indentation | number |
...children | string[] |
Returns: string