% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tags_mode.R
\name{llm_parse_tags}
\alias{llm_parse_tags}
\title{Parse XML-like tags emitted by an LLM}
\usage{
llm_parse_tags(x, tags)
}
\arguments{
\item{x}{Character scalar or \link{llmr_response}.}

\item{tags}{Character vector of tag names to extract.}
}
\value{
A named list of extracted tag values, or \code{NULL} when no requested tag
is found.
}
\description{
Extracts simple XML-like tags from a character scalar or \link{llmr_response}, such
as \verb{<age>21</age>} and \verb{<job>student</job>}. This is intended for soft
structured output, not full XML validation.
}
\examples{
llm_parse_tags("<age>21</age><job>student</job>", tags = c("age", "job"))

}
\seealso{
\code{\link[=llm_parse_tags_col]{llm_parse_tags_col()}}, \code{\link[=llm_mutate_tags]{llm_mutate_tags()}}
}
