• Validates if the specified string has a valid XML syntax structure.

    Parameters

    • xml: string | Buffer

      String or Buffer to validate, when a buffer is passed it iis converted to a string before parsing.

    Returns boolean

    True if the string is valid XML otherwise false.