Skip to content

strip_namespaces doesn't work for attributes #95

@KieranP

Description

@KieranP

XML:

<wd:Position_Data wd:Effective_Date="2022-02-01">
  <wd:Position_ID>12345</wd:Position_ID>
</wd:Position_Data>

Ruby:

content = File.read('response.xml')
nori = Nori.new(strip_namespaces: true)
hash = nori.parse(content)
puts hash.inspect

Expected:

{"Position_Data"=>{"Position_ID"=>"12345", "@Effective_Date"=>"2022-02-01"}}

Actual:

{"Position_Data"=>{"Position_ID"=>"12345", "@wd:Effective_Date"=>"2022-02-01"}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help wantedIf you want to assist development of Nori, this is a task which could be for you.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions