Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "wed/serializer"

An XML serializer for platforms that produce erratic results.

author

Louis-Dominique Dubeau

license

MPL 2.0

copyright

Mangalam Research Center for Buddhist Languages

Index

Variables

Const typeToHandler

typeToHandler: Record<string, Function> = Object.create(null)

Functions

_serialize

  • _serialize(out: string[], node: Node): void

Private escape

  • escape(text: string, isAttr: boolean): string
  • Escape characters that cannot be represented literally in XML.

    Parameters

    • text: string

      The text to escape.

    • isAttr: boolean

      Whether the text is part of an attribute.

    Returns string

    The escaped text.

serialize

  • serialize(root: Element | Document | DocumentFragment): string
  • Serialize an XML tree. This serializer implements only as much as wed currently needs. Notably, this does not currently serialize comments, CDATA, or processing instructions.

    Parameters

    • root: Element | Document | DocumentFragment

      The root of the document.

    Returns string

    The serialized document.

serializeDocument

  • serializeDocument(out: string[], node: Document): void

serializeElement

  • serializeElement(out: string[], node: Element): void

serializeText

  • serializeText(out: string[], node: Text): void

Generated using TypeDoc