Expand description
XML Reference Parser for Large Content Blocks
Allows LLMs to write large text blocks (scripts, configs, etc.) outside JSON using simple XML-style tags, avoiding JSON string escaping issues.
§Format
{"actions": [{"code": "<script001>"}]}
<script001>
import json
# No escaping needed!
</script001>Supports both standard XML (</tag>) and simplified (<tag>) closing tags.
Tags can appear before, after, or mixed with JSON.
Functions§
- contains_
references - Check if a string contains XML reference placeholders
Only matches tags containing at least one digit (like
, ) - extract_
references - Extract XML-style references from LLM response
- resolve_
references - Resolve XML reference placeholders in JSON string