The parser code in ec2.rb, line 2022:
2021 def tagstart(name, attributes)
=> 2022 @snapshot = {} if name == 'item'
2023 end
fails on input like the following:
<?xml version="1.0" encoding="UTF-8"?>
<DescribeSnapshotsResponse xmlns="
http://ec2.amazonaws.com/doc/
2010-08-31/">
<requestId>b9cde6c8-29d1-4f5d-bd1b-3c8c1565535c</requestId>
<snapshotSet>
<item>
<snapshotId>snap-121ec67e</snapshotId>
... tags removed for clarity...
<description>c5 snap after April outage</description>
<tagSet>
<item>
<key>rotation_level</key>
<value>daily 1</value>
</item>
</tagSet>
</item>
</snapshotSet>
</DescribeSnapshotsResponse>
The problem is that <item> is being used in two different contexts,
and the Parser class is not keeping track of state. I would expect to
see that custom tags added to snapshots would appear in the resultant
snapshot hash. Instead, when they are encountered they wipe out all
of the hash attributes parsed so far for the snapshot.
This bug was encountered while using the aws-2.4.5 gem. Does anyone
have a fix, or suggestions for dealing with this?
Thanks in advance!