Trouble populating Class converted from SCHEMA using XSD.EXE

dmvprof

Member
Joined
Dec 9, 2010
Messages
12
Programming Experience
Beginner
I have created a strongly typed class from an XML document using XSD.EXE code generator. First I created the XSD file, then I created the Class from it.

The class builds fine but I am running into a massive wall when it comes to populating it. The class contains arrays of arrays ...eg ...

Public Property DocumentDescriptiveMetadata() As SubmissionDocumentDocumentDescriptiveMetadataDocumentID()()

I have attached the entire solution that has two of the classes that I generated.

My first effort was to simply go in and populate the header. "courtheader".

It contains the Submission Organization and the Submission Document

This is what the XML for the Header will look like.

<cch:court>

<cch:Header>

<hj:SubmissionSubmitter.Organization>

<hj:OrganizationORIID>
<hj:ID>GACCA0000</hj:ID>
</hj:OrganizationORIID>
</hj:SubmissionSubmitter.Organization>

<hj:SubmissionDocument>

<hj:DocumentDescriptiveMetadata>

<hj:DocumentID>
<hj:ID>0000001033803</hj:ID>
</hj:DocumentID>
</hj:DocumentDescriptiveMetadata>

<hj:DocumentSource.Organization>

<hj:OrganizationORIID>
<hj:ID>GA115015J</hj:ID>
</hj:OrganizationORIID>
</hj:DocumentSource.Organization>
</hj:SubmissionDocument>
</cch:Header>


I was able to load the "SubmissionSubmitterOrganization" node, but the "SubmissionDocument" is kicking my butt. All I need is to see is an example of how to create the objects needed to populate the arrays.

Anyone willing to help with this wins a prize!!!!

Thanks
 

Attachments

  • CourtXMLTransactions.zip
    15.2 KB · Views: 18
Last edited by a moderator:
Hi Mattp
Thanks for taking the time to look at this.

I believe what you're suggesting is to abandon the whole "serialize/deserialize" model I'm using and use linq.

I'm open to that though it's new(to me), but I wanted to make sure that this isn't a dead end road for what I'm trying to do.

I'm trying to generate new xml documents based on a Schema that another agency has provided. It looked like your examples were getting data out of XML documents.

Since I've posted this, it appears that my problem all along has been manipulating jagged arrays. I think I have that down, but now there seems to be some sort of issue with serializing my class with a jagged array in it.
 
Back
Top