XML2Dict icon indicating copy to clipboard operation
XML2Dict copied to clipboard

Easier access to attributes with #attributes

Open josephernest opened this issue 11 years ago • 0 comments

With...

<root>
  <blah myattr="foo">Bonjour</blah>
</root>

..., would it be possible to have :

print d['root']['blah']['#myattr']      # foo

instead of (now it is like this) :

print d['root']['blah']['#blah']['myattr']   # foo

Moreover, when I slighly change the original XML, there is sometimes @myattr and sometimes #myattr : would it be possible to simplify this and have only @ or only # ?

josephernest avatar Feb 18 '14 11:02 josephernest