I'd like to serialize something like this, where there is a header and a body.
The first part "galleryData" is the header The 2nd part is "imageData" - repeated for each image in gallery
<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>
I see how to do it if I didn't need a header area. I'm currently just using xmlwriter to create it, but I'd like to serialize the object out to xml instead.