开发者

amazon simpledb get count

in c#, how do I get the value of count from this response from amazon simpledb (using amazon .net sdk):

<?xml version="1.0" encoding="utf-16"?>
<SelectResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sdb.amazonaws.com/doc/2009-04-15/">
  <SelectResult>
    <Item>
      <Name>Domain</Name>
      <Attribute>
        <Name>Count</Name>
        <Value>0</Value>
      </Attribute>
    </Item>
  </SelectResult>
  <ResponseMetadata>
    <RequestId>0ef874ad-2298-b6a9-101d-f96a1e188879</RequestId>
    <BoxUsage>0.0000228538</BoxUsage>
  </ResponseMetadata>
</SelectResponse>

i am interested in line:

<Value>0</Value>

for some reason whatever I do I can not get just the value: 0. probably am missing something. can't even share what I tried since I tried many things - even - for each, even though its just 1 result.

this is the query that generated it:

select count开发者_开发知识库(*) from Users where Email = 'hello@example.com'

so another question:

what does this line in response mean:

<Name>Domain</Name>

I would expect this to be:

<Name>Users</Name>

no?


answer (got it :):

response.SelectResult.Item[0].Attribute[0].Value

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜