Options
All
  • Public
  • Public/Protected
  • All
Menu

js2xmlparser

Index

Functions

parse

  • parse(root: string, object: unknown, options?: IOptions): string
  • Returns a XML string representation of the specified object using the specified options.

    root is the name of the root XML element. When the object is converted to XML, it will be a child of this root element.

    Parameters

    • root: string
    • object: unknown
    • Optional options: IOptions

    Returns string

parseToExistingElement

  • parseToExistingElement(element: default<unknown>, object: unknown, options?: IOptions): void
  • Converts the specified object to XML and adds the XML representation to the specified XmlElement object using the specified options.

    This function does not add a root element. In addition, it does not add an XML declaration or DTD, and the associated options in IOptions are ignored. If desired, these must be added manually.

    Parameters

    • element: default<unknown>
    • object: unknown
    • Optional options: IOptions

    Returns void

Generated using TypeDoc