A
andrewcw
( excuse earlier bad post, I was attemptingt to use tab
key which sent message ).
I am using a class genereated by XSD. From data I will
collect I plan to build the object & serialize as XMl
But I cannot yet load the object heirarchy w/o error
an array of diskitem with each having an array of item as
iluustrated below
<qrecord> <!-- root -->
<diskitem ...>
<item ...>
<what ...>
</item>
</diskitem>
<diskitem ...>
<item ...>
<what ...>
</item>
</diskitem>
</qcrecord>
test code looks like this ( Thanks ) :
try
{
qcstate.qcrecord fullQCState = new qcstate.qcrecord();
qcstate.disksetitem dsItemObj = new qcstate.disksetitem();
fullQCState.disksetitem[0]=dsItemObj; // attach a diskitem
object but this ALREADY FAILS
qcstate.item manItem = new qcstate.item();
dsItemObj.item[0]= manItem; // attach an iten object to
diskitem
qcstate.what whatObj = new
qcstate.whatdsItemObj.customer_code="KFC";
whatObj.bookid="foo man"; //
manItem.what=whatObj; // attach the what obj to an item
Object
}
catch ( Exception e)
{
Console.WriteLine(e.Message);
}
// from class file: public class qcrecord {
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute
("disksetitem")]
public disksetitem[] disksetitem;
}
key which sent message ).
I am using a class genereated by XSD. From data I will
collect I plan to build the object & serialize as XMl
But I cannot yet load the object heirarchy w/o error
an array of diskitem with each having an array of item as
iluustrated below
<qrecord> <!-- root -->
<diskitem ...>
<item ...>
<what ...>
</item>
</diskitem>
<diskitem ...>
<item ...>
<what ...>
</item>
</diskitem>
</qcrecord>
test code looks like this ( Thanks ) :
try
{
qcstate.qcrecord fullQCState = new qcstate.qcrecord();
qcstate.disksetitem dsItemObj = new qcstate.disksetitem();
fullQCState.disksetitem[0]=dsItemObj; // attach a diskitem
object but this ALREADY FAILS
qcstate.item manItem = new qcstate.item();
dsItemObj.item[0]= manItem; // attach an iten object to
diskitem
qcstate.what whatObj = new
qcstate.whatdsItemObj.customer_code="KFC";
whatObj.bookid="foo man"; //
manItem.what=whatObj; // attach the what obj to an item
Object
}
catch ( Exception e)
{
Console.WriteLine(e.Message);
}
// from class file: public class qcrecord {
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute
("disksetitem")]
public disksetitem[] disksetitem;
}