Skip to content

Parsing included NML files #8

Description

@rgerkin

In the old version of this model (before 5 months ago) when it was all in one LEMS file, I could grab pulseGenerator tags with something like:

from neuroml import nml
tree = nml.nml.parsexml_('NeuroML2/LEMS_2007One.xml')
tree.findall('pulseGenerator')

Now that most of the relevant elements have been moved to Izh2007One.net.nml, I cannot do the same thing because

tree = nml.nml.parsexml_('NeuroML2/Izh2007One.net.nml')
tree.findall('pulseGenerator')

gives an empty list. It seems that the tree can no longer easily locate any of the tags contained in it through this method. I found that if I remove all the attributes of the enclosing neuroml tag, i.e. change
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.githubusercontent.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta4.xsd" id="WhichModel"> to just <neuroml>, then I can recover the functionality. Do you know what about these neuroml tag attributes are causing findall to fail, and if there is any change I can make to avoid trashing the neuroml tags like this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions