Files
beall-11ty/node_modules/@rgrove/parse-xml/dist/lib/XmlElement.d.ts
2026-03-31 16:38:22 -07:00

40 lines
1.2 KiB
TypeScript

import { XmlNode } from './XmlNode.js';
import type { JsonObject } from './types.js';
import type { XmlCdata } from './XmlCdata.js';
import type { XmlComment } from './XmlComment.js';
import type { XmlProcessingInstruction } from './XmlProcessingInstruction.js';
import type { XmlText } from './XmlText.js';
/**
* Element in an XML document.
*/
export declare class XmlElement extends XmlNode {
/**
* Attributes on this element.
*/
attributes: {
[attrName: string]: string;
};
/**
* Child nodes of this element.
*/
children: Array<XmlCdata | XmlComment | XmlElement | XmlProcessingInstruction | XmlText>;
/**
* Name of this element.
*/
name: string;
constructor(name: string, attributes?: {
[attrName: string]: string;
}, children?: Array<XmlCdata | XmlComment | XmlElement | XmlProcessingInstruction | XmlText>);
/**
* Whether this element is empty (meaning it has no children).
*/
get isEmpty(): boolean;
get preserveWhitespace(): boolean;
/**
* Text content of this element and all its descendants.
*/
get text(): string;
get type(): string;
toJSON(): JsonObject;
}
//# sourceMappingURL=XmlElement.d.ts.map