• Determine if the specified string has a XML declaration and a root tag if so returns true otherwise false (depends on getRootTagName)

    Parameters

    • xml: string | Buffer

      XML string or buffer

    • Optional options: {
          requireDeclaration?: boolean;
      }
      • Optional requireDeclaration?: boolean

    Returns boolean

    true when this the buffer has a valid XML declaration and root tag otherwise false