我想序列化這樣的事情,那裏是一個頭和身體。C#XML序列化
第一部分「galleryData」是標題 第二部分是「爲imageData」 - 在畫廊重複每個圖像
<galleryData>
<title>some title</title>
<uuid>32432322</uuid>
<imagepath>some path</imagepath>
</galleryData>
<imageData>
<title>title one</title>
<category>nature</category>
<description>blah blah</description>
</imageData>
<imageData>
<title>title two</title>
<category>nature</category>
<description>blah blah</description>
</imageData>
<imageData>
<title>title three</title>
<category>nature</category>
<description>blah blah</description>
</imageData>
我看怎麼做,如果我並不需要一個標題區。我目前只是用xmlwriter來創建它,但我想將對象序列化爲xml。
你能粘貼你用來生成上面的XML的代碼? – mlsteeves 2011-03-22 14:11:54
問題是?顯示目前爲止的代碼並描述問題。 – 2011-03-22 14:12:29