qgserde - v0.3.1
    Preparing search index...

    Function parseQgs

    • Read QGS XML into an editable model independent of the source QGIS version.

      Parameters

      • xml: string

        Decoded QGS XML as a Unicode string. QGZ archives are not supported.

      Returns QgsProject

      A project with typed properties and internal unknown-data and order information. The original XML is not retained as a backup.

      QgsError INVALID_XML for malformed XML, INVALID_PROJECT for invalid project structure or modeled values, or INVALID_VERSION for invalid version syntax.

      const project = parseQgs(qgsXml);
      project.title = "Regional map";
      const xml = serializeQgs(project, { version: "4.2" });