Skip to content

XML Parser fails for empty tags #611

@meretp

Description

@meretp

When trying to parse a XML SPDX document with an empty tag for creators the following error is raised

Error while parsing Document: ["Error while parsing creators: ['e', 'x', 'p', 'e', 'c', 't', 'e', 'd', ' ', 's', 't', 'r', 'i', 'n', 'g', ' ', 'o', 'r', ' ', 'b', 'y', 't', 'e', 's', '-', 'l', 'i', 'k', 'e', ' ', 'o', 'b', 'j', 'e', 'c', 't']"
]

Minimal document for reference:

<?xml version='1.0' encoding='UTF-8'?>
<Document>
  <SPDXID>SPDXRef-DOCUMENT</SPDXID>
  <spdxVersion>SPDX-2.3</spdxVersion>
  <creationInfo>
    <created>2011-01-29T18:30:22Z</created>
    <creators></creators>
    <licenseListVersion>3.17</licenseListVersion>
  </creationInfo>
  <name>SPDX-Tools-v2.0</name>
  <version>v2.0</version>
  <dataLicense>CC0-1.0</dataLicense>
  <documentNamespace>http://spdx.org/spdxdocs/spdx-example-xml-2-3-444504E0-4F89-41D3-9A0C-0305E82C3301</documentNamespace>
  <packages>
    <SPDXID>SPDXRef-Package</SPDXID>
      <downloadLocation>http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz</downloadLocation>
      <name>Test</name>
  </packages>
</Document>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions