Options
All
  • Public
  • Public/Protected
  • All
Menu

Class XmlDecl<Parent>

Represents a declaration.

A declaration is structured as follows, where {version} is the XML version, {encoding} is the encoding of the document, and {standalone} is either "yes" or "no", depending on whether the document may contain external markup declarations:

<?xml version="{version}" encoding="{encoding}" standalone="{standalone}"?>

Type parameters

  • Parent

Hierarchy

  • XmlDecl

Index

Constructors

constructor

  • Parameters

    Returns XmlDecl

Properties

Private _encoding

_encoding: string | undefined

Private _parent

_parent: Parent

Private _standalone

_standalone: string | undefined

Private _validation

_validation: boolean

Private _version

_version: string = "1.0"

Accessors

encoding

  • get encoding(): undefined | string
  • set encoding(encoding: string | undefined): void
  • Gets the encoding associated with this declaration.

    Returns undefined | string

  • Sets the encoding associated with this declaration.

    Parameters

    • encoding: string | undefined

    Returns void

standalone

  • get standalone(): undefined | string
  • set standalone(standalone: string | undefined): void
  • Gets the value of the standalone attribute associated with this declaration.

    Returns undefined | string

  • Sets the value of the standalone attribute associated with this declaration.

    Parameters

    • standalone: string | undefined

    Returns void

version

  • get version(): string
  • set version(version: string): void
  • Gets the XML version associated with this declaration.

    Returns string

  • Sets the XML version associated with this declaration.

    Parameters

    • version: string

    Returns void

Methods

toString

  • Returns an XML string representation of this declaration.

    Parameters

    Returns string

up

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

    Returns Parent

Generated using TypeDoc