Skip to main content

Module xml

Module xml 

Source
Expand description

XML-style tag extraction from LLM responses.

Provides parse_xml_tag and parse_xml_tags for extracting content from XML-style structured delimiters in LLM output. Does NOT use a full XML parser — these are lightweight tag-matching functions.

Functions§

parse_xml_tag
Extract content from a single XML-style tag in an LLM response.
parse_xml_tag_with_trace
Extract content from a single XML-style tag with diagnostic trace.
parse_xml_tags
Extract content from multiple XML-style tags into a map.
parse_xml_tags_with_trace
Extract content from multiple XML-style tags with diagnostic trace.