Options
All
  • Public
  • Public/Protected
  • All
Menu

Class XmlProcInst

Represents an XML processing instruction.

An XML processing instruction is structured as follows, where {target} and {content} are the target and content of the processing instruction respectively.

<?{target} {content}?>

The {target} and {content} values are properties of this node.

XmlProcInst nodes cannot have any children.

Hierarchy

Index

Constructors

constructor

  • new XmlProcInst(target: string, content?: string): XmlProcInst
  • Initializes a new instance of the XmlProcInst class.

    Parameters

    • target: string

      The target of the processing instruction.

    • Optional content: string

    Returns XmlProcInst

Properties

Protected _children

_children: XmlNode[]

Private _content

_content: string

Private _target

_target: string

Accessors

content

  • get content(): string
  • set content(content: string): void
  • Gets the data of the processing instruction.

    Returns string

    The data of the processing instruction. This value may be undefined.

  • Sets the data of the processing instruction.

    Parameters

    • content: string

      The data of the processing instruction. This value may be undefined.

    Returns void

    The data of the processing instruction. This value may be undefined.

parent

  • Gets the parent of this node.

    Returns XmlNode

    The parent of this node.

target

  • get target(): string
  • set target(target: string): void
  • Gets the target of the processing instruction.

    Returns string

    The target of the processing instruction.

  • Sets the target of the processing instruction.

    Parameters

    • target: string

      The target of the processing instruction.

    Returns void

    The target of the processing instruction.

Methods

children

insertChild

next

  • Gets the node that follows this one, or undefined if no such node exists or if this node has no parent.

    Returns XmlNode

    The node that follows this one, or undefined if no such node exists or if this node has no parent.

prev

  • Gets the node that is previous to this one, or undefined if no such node exists or if this node has no parent.

    Returns XmlNode

    The node that is previous to this one, or undefined if no such node exists or if this node has no parent.

remove

  • Removes this node from its parent if this node has a parent.

    Returns XmlNode

    This node's parent, or undefined if it has no parent.

removeChild

  • removeChild(node: XmlNode): boolean

removeChildAtIndex

  • removeChildAtIndex(index: number): XmlNode

toString

  • Returns an XML string representation of this node.

    Parameters

    Returns string

    An XML string representation of this node.

top

  • Returns the root node of the current hierarchy. If this node has no parent, this node itself is returned.

    Returns XmlNode

    The root node of the current hierarchy.

up

  • Gets the parent of this node.

    Returns XmlNode

    The parent of this node.

Generated using TypeDoc