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

readSedMLFromFile doesn't properly handle XML text nodes in newXML #91

Open
jonrkarr opened this issue Jan 18, 2021 · 0 comments
Open

Comments

@jonrkarr
Copy link
Contributor

This is an edge case, but since SED-ML is divorced from the details of particular model formats, adding a text node could be a valid operation in a model format.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<sedML xmlns="http://sed-ml.org/sed-ml/level1/version3" level="1" version="3">
  <listOfModels>
    <model id="model" language="urn:sedml:language:sbml" source="model.sbml">
      <listOfChanges>
        <addXML target="/sbml:sbml/sbml:model[id=&apos;b&apos;]/sbml:listOfParameters">
          <newXML>1.9</newXML>
        </addXML>
      </listOfChanges>
    </model>
  </listOfModels>
</sedML>

Here's how libSED-ML behaves on this example:

  • XMLNode_convertXMLNodeToString and XMLNode_convertStringToXMLNode correctly round trip 1.9
  • writeSedMLToString can export text nodes
  • readSedMLFromFile does not correctly import this. newXML is null and no error is raised.

I expected newXML to be text node with value 1.9.

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

No branches or pull requests

1 participant