UNPKG

typesxml

Version:

Open source XML library written in TypeScript

51 lines (50 loc) 1.98 kB
/******************************************************************************* * Copyright (c) 2023-2026 Maxprograms. * * This program and the accompanying materials * are made available under the terms of the Eclipse License 1.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/org/documents/epl-v10.html * * Contributors: * Maxprograms - initial API and implementation *******************************************************************************/ import { XMLAttribute } from "./XMLAttribute.js"; import { CData } from "./CData.js"; import { XMLComment } from "./XMLComment.js"; import { ProcessingInstruction } from "./ProcessingInstruction.js"; import { TextNode } from "./TextNode.js"; import { XMLNode } from "./XMLNode.js"; export declare class XMLElement implements XMLNode { private name; private attributes; private content; constructor(name: string); getName(): string; getNamespace(): string; hasAttribute(name: string): boolean; getAttribute(name: string): XMLAttribute | undefined; setAttribute(attribute: XMLAttribute): void; removeAttribute(name: string): void; setAttributes(array: Array<XMLAttribute>): void; getAttributes(): Array<XMLAttribute>; addString(text: string): void; addTextNode(node: TextNode): void; addElement(node: XMLElement): void; addComment(node: XMLComment): void; addProcessingInstruction(node: ProcessingInstruction): void; addCData(node: CData): void; setContent(content: Array<XMLNode>): void; getContent(): Array<XMLNode>; getNodeType(): number; getHead(): string; getTail(): string; toString(): string; equals(node: XMLNode): boolean; getChildren(): Array<XMLElement>; getChild(childName: string): XMLElement | undefined; removeChild(child: XMLElement): void; getText(): string; pureText(): string; getPI(target: string): ProcessingInstruction | undefined; }