Note that there are some explanatory texts on larger screens.

plurals
  1. PO.NET XML Seralization
    primarykey
    data
    text
    <p>I'm working on a set of classes that will be used to serialize to XML. The XML is not controlled by me and is organized rather well. Unfortunately, there are several sets of nested nodes, the purpose of some of them is just to hold a collection of their children. Based on my current knowledge of XML Serialization, those nodes require another class.</p> <p>Is there a way to make a class serialize to a set of XML nodes instead of just one. Because I feel like I'm being as clear as mud, say we have the xml:</p> <pre><code>&lt;root&gt; &lt;users&gt; &lt;user id=""&gt; &lt;firstname /&gt; &lt;lastname /&gt; ... &lt;/user&gt; &lt;user id=""&gt; &lt;firstname /&gt; &lt;lastname /&gt; ... &lt;/user&gt; &lt;/users&gt; &lt;groups&gt; &lt;group id="" groupname=""&gt; &lt;userid /&gt; &lt;userid /&gt; &lt;/group&gt; &lt;group id="" groupname=""&gt; &lt;userid /&gt; &lt;userid /&gt; &lt;/group&gt; &lt;/groups&gt; &lt;/root&gt; </code></pre> <p>Ideally, 3 classes would be best. A class <code>root</code> with collections of <code>user</code> and <code>group</code> objects. However, best I can figure is that I need a class for <code>root</code>, <code>users</code>, <code>user</code>, <code>groups</code> and <code>group</code>, where <code>users</code> and <code>groups</code> contain only collections of <code>user</code> and <code>group</code> respectively, and <code>root</code> contains a <code>users</code>, and <code>groups</code> object.</p> <p>Anyone out there who knows better than me? (don't lie, I know there are).</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. 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