import { XmlOutputBuffer } from "./XmlOutputBuffer.ts";
import type { Encoding } from "../interfaces.ts";
import { DataSegment } from "../utils/DataSegment.ts";
/**
 * A wrapper class for `xmlDocPtr` in libxml2
 */
declare class XmlDocument extends DataSegment {
    static fromFileOrUrl(fileOrUrl: string, encoding?: Encoding | null): Promise<XmlDocument>;
    static fromString(xmlString: string): Promise<XmlDocument>;
    delete(): void;
    /**
     * Formats the XML document as a string by dumping the XML tree to an
     * {@link XmlOutputBuffer} and returning its string representation.
     */
    toString(options?: {
        format?: boolean;
        encoding?: Encoding;
    }): string;
    /**
     * Assuming the document is an HTML tree, dumps the document to an
     * {@link XmlOutputBuffer} and returns the output buffer
     */
    toHtmlOutputBuffer(options?: {
        format?: boolean;
        encoding?: Encoding;
    }): XmlOutputBuffer;
    /**
     * Assuming the document is an HTML tree, serializes the document via
     * {@link toHtmlOutputBuffer} and returns the string
     */
    toHtmlString(options?: {
        format?: boolean;
        encoding?: Encoding;
    }): string;
}
export { XmlDocument };
