/**
* XML → Plain Object (SAX-direct)
*
* Parses an XML string directly into a plain JavaScript object, bypassing the
* DOM tree entirely. This is the fastest path for "XML string → plain object →
* JSON.stringify" workflows.
*
* For converting an already-parsed {@link XmlElement} tree, use
* {@link toPlainObject} from `./dom` instead.
*/
import type { ParseXmlToObjectOptions } from "./types.js";
/**
* Parse an XML string directly into a plain JavaScript object.
*
* Unlike `parseXml` + `toPlainObject`, this function builds the plain object
* in a single SAX pass with **zero intermediate DOM nodes**. Use this when
* performance matters and you only need the plain-object output.
*
* The output format matches {@link toPlainObject}: attributes are prefixed
* (default `@_`), text-only elements collapse to strings, and repeated
* sibling names merge into arrays.
*
* @param xml - Complete XML string.
* @param options - Conversion and parser options.
* @returns A plain JavaScript object representing the root element.
* @throws {XmlParseError} If the XML is malformed.
*
* @example
* ```ts
* const obj = parseXmlToObject('text');
* // { root: { "@_attr": "1", child: "text" } }
* ```
*/
declare function parseXmlToObject(xml: string, options?: ParseXmlToObjectOptions): Record;
export { parseXmlToObject };