Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Almost everything is good, I see two little mistakes.</p> <p>First: </p> <p>You don't need <code>@Root (name = "entry/author")</code> just <code>@Root (name = "author")</code></p> <p>You should not depend of the parent of where it is going to be placed your class. </p> <hr> <p>Second One</p> <pre><code> @ElementList(inline = true, type = String.class, entry = "entry") private List&lt;Entry&gt; entries; </code></pre> <p>Should Be</p> <pre><code> @ElementList(inline = true, type = WhatsNewFeed_entry.class, entry = "entry") private List&lt;WhatsNewFeed_entry &gt; entries; </code></pre> <p>In fact I think you just need </p> <pre><code>@ElementList(inline = true, entry = "entry") private List&lt;WhatsNewFeed_entry &gt; entries; </code></pre> <p>because you are already specifying the collection name in <code>List&lt;WhatsNewFeed_entry &gt;</code></p> <p>The mistake is that you aren't specifying what class to Use, you was Specifying it as a String, that's why I asked what was "Entry" you wasn't telling the Serializer to use the </p> <pre><code>WhatsNewFeed_entry </code></pre> <p>After that, it should work for you</p> <hr> <p>As an additional oppinion, I don't really like the <code>@Root</code> because you are forcing the class to have an specific node name neither to force the properties or fields to be named as the XML expected tags , I think is a better approach to name it in the element, its more clear, you feel that you are making a real XML. And you design your classes as you</p> <p>I'm not very good with java, come from C# world but it's so similar.</p> <p>I would rewrite it a little like this:</p> <pre><code> //First level @Root (name = "feed") public class Feed { // All lines @Element("id") private String id; @Element("author") private Author_feed author; @Element("title") private String title; @Element("updated") private String updated; @ElementList(inline = true, entry = "entry") private List&lt;WhatsNewFeed_entry&gt; entries; } //Note that there is no root because it was already defined in the first level, //this way you can use the same class in differents node with different tag names, you //could even make an abstract class of author and in one just post the uri class isntead of // 2 author classes with the same properties public class Author_feed { // Lines 03-07 @Element("name") private String name; @Element("uri") private String uri; @Element("id") @Namespace(prefix = "y") private String id; } class Author_entry { // Lines 12-15 @Element("name") private String name; @Element("id") @Namespace(prefix = "y") private String id; } public class WhatsNewFeed_entry { // Lines 10-16 @Element (name = "id") private String id_entry; @Element("author") private Author_entry author; } </code></pre> <p>Hope it helps you to understand what was missing</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload