@elizaos/core v1.0.0-beta.51 / parseKeyValueXml
Function: parseKeyValueXml()
parseKeyValueXml(
text
):Record
<string
,any
>
Parses key-value pairs from a simple XML structure within a given text.
It looks for an XML block (e.g.,
Note: This uses regex and is suitable for simple, predictable XML structures. For complex XML, a proper parsing library is recommended.
Parameters​
• text: string
The input text containing the XML structure.
Returns​
Record
<string
, any
>
An object with key-value pairs extracted from the XML, or null if parsing fails.