xml
Ce contenu n’est pas encore disponible dans votre langue.
Utils to parse, format and write XML.
Type Aliases
ParsedXmlAttribute
Defined in
tmp/commons/src/lib/utils/xml.ts:304
parsedXmlComment
Type declaration
#comment
Defined in
tmp/commons/src/lib/utils/xml.ts:311
ParsedXmlNode
Index Signature
[key
: string
]: ParsedXmlAttribute
| ParsedXmlNode
[] | string
| undefined
Type declaration
#text?
Defined in
tmp/commons/src/lib/utils/xml.ts:306
ParsedXmlNodes
Defined in
tmp/commons/src/lib/utils/xml.ts:315
Functions
buildXml()
Parameters
• __namedParameters
• __namedParameters.baseSpace?: string
= ''
• __namedParameters.cursorTag?: string
• __namedParameters.endWithNewLine?: boolean
= true
• __namedParameters.indent?: number
= 2
• __namedParameters.parsedXml: ParsedXmlNodes
Returns
string
Defined in
tmp/commons/src/lib/utils/xml.ts:56
findPossibleMergePositions()
Returns the different paths to the possible merge positions
Parameters
• param0
• param0.baseXml: ParsedXmlNodes
• param0.cursorTag?: string
• param0.element: string
• param0.typesPaths: Map
<string
, string
[][] | "infinite"
>
Returns
object
[]
Defined in
tmp/commons/src/lib/utils/xml.ts:142
formatComment()
Parameters
• comment: string
Returns
string
Defined in
tmp/commons/src/lib/utils/xml.ts:300
formatXml()
Parameters
• __namedParameters
• __namedParameters.indent?: number
= 2
• __namedParameters.xml: string
Returns
string
Defined in
tmp/commons/src/lib/utils/xml.ts:295
formatXMLArray()
Parameters
• arr: unknown
[]
Returns
string
Defined in
tmp/commons/src/lib/utils/xml.ts:30
getElementFromParsedXml()
Parameters
• xml: Record
<string
, unknown
>
Returns
string
| null
Defined in
tmp/commons/src/lib/utils/xml.ts:129
getXmlAttributes()
Parameters
• xml
• xml.:@?: ParsedXmlAttribute
Returns
Record
<string
, string
>
Defined in
tmp/commons/src/lib/utils/xml.ts:197
mergeParsedXml()
Parameters
• __namedParameters
• __namedParameters.baseXml: ParsedXmlNodes
• __namedParameters.cursorTag?: string
• __namedParameters.newXml: ParsedXmlNodes
• __namedParameters.typesPaths: Map
<string
, string
[][] | "infinite"
>
Returns
Defined in
tmp/commons/src/lib/utils/xml.ts:226
parseXml()
Parameters
• xml: string
Returns
Defined in
tmp/commons/src/lib/utils/xml.ts:48
parseXMLArray()
Parameters
• xml: string
Returns
unknown
[] | undefined