vlocode-project - v1.41.2
    Preparing search index...

    Function getRootTagName

    • Get the name of the root element of a XML string excluding the XML deceleration:

      <!-- Returns name of first none-comment root tag: rootTag -->
      <rootTag>
      <inner />
      </rootTag

      Parameters

      • xml: string | Buffer<ArrayBufferLike>

        XML string or buffer

      • Optionaloptions: { requireDeclaration?: boolean }
        • OptionalrequireDeclaration?: boolean

          When true the function will return undefined when the XML string does not start with a XML declaration

      Returns string | undefined

      Name of the root tag in the XML file