typesxml
Version:
Open source XML library written in TypeScript
50 lines (49 loc) • 1.94 kB
TypeScript
/*******************************************************************************
* Copyright (c) 2023 - 2024 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";
import { CData } from "./CData";
import { XMLComment } from "./XMLComment";
import { ProcessingInstruction } from "./ProcessingInstruction";
import { TextNode } from "./TextNode";
import { XMLNode } from "./XMLNode";
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;
getPI(target: string): ProcessingInstruction | undefined;
}