@openxmldev/linq-to-xml
Version:
LINQ to XML for TypeScript
53 lines (52 loc) • 1.4 kB
TypeScript
/**
* @author Thomas Barnekow
* @license MIT
*/
import { Stringifyable, XObject, XName } from './internal.js';
/**
* Represents an XML attribute.
*/
export declare class XAttribute extends XObject {
/**
* Initializes a new instance.
*
* @param name The name of the attribute.
* @param value The value of the attribute.
*/
constructor(name: XName | string, value: Stringifyable);
/**
* Gets an empty collection of attributes.
*/
static readonly emptySequence: Iterable<XAttribute>;
private static validateAttribute;
/**
* Gets a value indicating if this attribute is a namespace declaration.
*/
get isNamespaceDeclaration(): boolean;
/**
* Gets the name of this attribute.
*/
get name(): XName;
/**
* Gets the next attribute of the parent element.
*/
get nextAttribute(): XAttribute | null;
/**
* Gets the value of this attribute.
*/
get value(): string;
/**
* Sets the value of this attribute.
*/
set value(value: string);
/**
* Removes this attribute from its parent.
*/
remove(): void;
/**
* Gets the XML text representation of an attribute and its value.
*
* @returns The XML text representation of an attribute and its value.
*/
toString(): string;
}