Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML Parser fails for empty tags #611

Closed
meretp opened this issue Apr 24, 2023 · 1 comment · Fixed by #612
Closed

XML Parser fails for empty tags #611

meretp opened this issue Apr 24, 2023 · 1 comment · Fixed by #612

Comments

@meretp
Copy link
Collaborator

meretp commented Apr 24, 2023

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>
@armintaenzertng
Copy link
Collaborator

Funny :D
Looks like the error is expected as a list, but is a string instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants