/** * XML utility functions for extracting data from QTI XML strings */ /** * Escapes special characters in XML attribute values * @param value The value to escape * @returns The escaped value */ export declare function escapeXmlAttribute(value: string): string; /** * Sanitizes a value for use in XML attributes by removing invalid characters * @param value The value to sanitize * @returns The sanitized value */ export declare function sanitizeXmlAttributeValue(value: string): string; /** * Replaces attributes on the root element of an XML string * @param xml The XML string * @param elementName The expected root element name * @param identifier The identifier attribute value * @param title The title attribute value * @returns The modified XML string */ export declare function replaceRootAttributes(xml: string, elementName: string, identifier: string, title: string): string; /** * Extracts the identifier attribute from a QTI XML element * @param xml The XML string to parse * @param elementName The name of the element (e.g., 'qti-assessment-item') * @returns The identifier value (throws if missing) */ export declare function extractIdentifier(xml: string, elementName: string): string; /** * Extracts the title from a QTI XML element * @param xml The XML string to parse * @returns The title value or null if not found */ export declare function extractTitle(xml: string): string | null; /** * Extracts the body content from a QTI stimulus XML * @param xml The XML string to parse * @returns The body content or null if not found */ export declare function extractQtiStimulusBodyContent(xml: string): string; /** * Extracts all assessment item references from a QTI test XML * @param xml The XML string to parse * @returns Array of referenced item identifiers */ export declare function extractItemRefs(xml: string): string[]; //# sourceMappingURL=xml-utils.d.ts.map