djangid / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

XML parsing doesn't work well for lists #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
You cannot work with lists in XML parsing. E.g. get all items doesn't work. 
E.g. 
expect("rss.channel.item", ..) should return a list of all items but it only 
returns the first. This needs to be fixed.

<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>something</title>
    <link>http://www.someone.com</link>
    <description>something RSS</description>
    <dc:creator>someone</dc:creator>
    <item>
      <title>A title</title>
      <link>http://www.something.com/link/1</link>
      <description>Description 1</description>
      <enclosure url="http://www.someone.com/somejpg.jpg" length="2721" type="image/jpg" />
      <pubDate>Mon, 10 Jan 2011 19:31:46 GMT</pubDate>
      <guid isPermaLink="false">http://www.something.com/link/1</guid>
      <dc:date>2011-01-10T19:31:46Z</dc:date>
    </item>
    <item>
      <title>Title 2</title>
      <link>http://www.something.com/link/2</link>
      <description>Description 2</description>
      <enclosure url="http://www.someone.com/someotherjpg.jpg" length="2721" type="image/jpg" />
      <pubDate>Mon, 10 Jan 2011 19:41:46 GMT</pubDate>
      <guid isPermaLink="false">http://www.something.com/link/2</guid>
      <dc:date>2011-01-10T19:42:46Z</dc:date>
    </item>
  </channel>
</rss>

Original issue reported on code.google.com by johan.ha...@gmail.com on 27 Jan 2011 at 9:15

GoogleCodeExporter commented 8 years ago

Original comment by johan.ha...@gmail.com on 12 Feb 2011 at 9:38