Skip to content

Instantly share code, notes, and snippets.

@trevorrowe
Created March 3, 2015 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trevorrowe/df78dd1f92cf02f19f76 to your computer and use it in GitHub Desktop.
Save trevorrowe/df78dd1f92cf02f19f76 to your computer and use it in GitHub Desktop.
XML parsing logic
shape = sqs.config.api.operation(:receive_message).output
shape = Seahorse::Model::Shapes::Structure.new({
'members' => {
shape.metadata('resultWrapper') => shape.definition,
'ResponseMetadata' => {
'type' => 'structure',
'members' => {
'RequestId' => { 'type' => 'string' }
}
}
}
}, shape_map: shape.shape_map)
xml = "<ReceiveMessageResponse>\n <ReceiveMessageResult>\n </ReceiveMessageResult>\n <ResponseMetadata>\n <RequestId>19643011-2310-45d0-8611-e8eaaccc550e</RequestId>\n </ResponseMetadata>\n</ReceiveMessageResponse>\n"
Aws::Xml::Parser.new(shape).parse(xml)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment