Options
All
  • Public
  • Public/Protected
  • All
Menu

Class XmlAttribute<Parent>

Represents an attribute.

An attribute is part of the start tag of an element and is structured as follows, where {name} is the name of the attribute and {value} is the value of the attribute:

<element {name}="{value}">

The {name} value is a property of this node, while the {value} property consists of the children of this node.

Attributes can have an unlimited number of attribute text, character references, and entity references.

Type parameters

  • Parent

Hierarchy

  • XmlAttribute

Index

Constructors

constructor

Properties

Private _children

_children: Array<Child<Parent>>

Private _name

_name: string

Private _parent

_parent: Parent

Private _replaceInvalidCharsInName

_replaceInvalidCharsInName: boolean

Private _validation

_validation: boolean

Accessors

name

  • get name(): string
  • set name(name: string): void
  • Gets the name of this attribute.

    Returns string

  • Sets the name of this attribute.

    Parameters

    • name: string

    Returns void

Methods

charRef

  • Adds a character reference to this attribute and returns the new character reference.

    Parameters

    Returns XmlCharRef<this>

entityRef

  • Adds an entity reference to this attribute and returns the new entity reference.

    Parameters

    Returns XmlEntityRef<this>

text

toString

  • Returns an XML string representation of this attribute.

    Parameters

    Returns string

up

  • up(): Parent
  • Returns the parent of this attribute.

    Returns Parent

Generated using TypeDoc