[C#] Serializacja XML


(marroz28) #1

Witam,

chcę zrobić program który na podstawie pliku .xsd stworzy plik .xml a następnie jego struktura zostanie wyświetlona w treeview. Mam gotowy program, który za pomocą xsd2code generuje plik .designer.cs na podstawie tego pliku xsd. No i tu rodzi się problem, żeby móc go zapisać do xml muszę go serializować. niestety nie wiem jak przeprowadzić tą serializację dla np 300 węzłów.

 

mam taki wygenerowany plik

namespace B2MML-V0600-ConfirmBOD {
    using System;
    using System.Diagnostics;
    using System.Xml.Serialization;
    using System.Collections;
    using System.Xml.Schema;
    using System.ComponentModel;
    using System.Collections.Generic;
    
    
    public partial class ConfirmBODType {
        
        private TransApplicationAreaType applicationAreaField;
        
        private ConfirmBODTypeDataArea dataAreaField;
        
        public ConfirmBODType() {
            this.dataAreaField = new ConfirmBODTypeDataArea();
            this.applicationAreaField = new TransApplicationAreaType();
        }
        
        public TransApplicationAreaType ApplicationArea {
            get {
                return this.applicationAreaField;
            }
            set {
                this.applicationAreaField = value;
            }
        }
        
        public ConfirmBODTypeDataArea DataArea {
            get {
                return this.dataAreaField;
            }
            set {
                this.dataAreaField = value;
            }
        }
    }
    
    public partial class TransApplicationAreaType {
        
        private TransSenderType senderField;
        
        private List<TransReceiverType> receiverField;
        
        private DateTimeType creationDateTimeField;
        
        private TransSignatureType signatureField;
        
        private IdentifierType bODIDField;
        
        private TransUserAreaType userAreaField;
        
        public TransApplicationAreaType() {
            this.userAreaField = new TransUserAreaType();
            this.bODIDField = new IdentifierType();
            this.signatureField = new TransSignatureType();
            this.creationDateTimeField = new DateTimeType();
            this.receiverField = new List<TransReceiverType>();
            this.senderField = new TransSenderType();
        }
        
        public TransSenderType Sender {
            get {
                return this.senderField;
            }
            set {
                this.senderField = value;
            }
        }
        
        public List<TransReceiverType> Receiver {
            get {
                return this.receiverField;
            }
            set {
                this.receiverField = value;
            }
        }
        
        public DateTimeType CreationDateTime {
            get {
                return this.creationDateTimeField;
            }
            set {
                this.creationDateTimeField = value;
            }
        }
        
        public TransSignatureType Signature {
            get {
                return this.signatureField;
            }
            set {
                this.signatureField = value;
            }
        }
        
        public IdentifierType BODID {
            get {
                return this.bODIDField;
            }
            set {
                this.bODIDField = value;
            }
        }
        
        public TransUserAreaType UserArea {
            get {
                return this.userAreaField;
            }
            set {
                this.userAreaField = value;
            }
        }
    }
    
    public partial class TransSenderType {
        
        private IdentifierType logicalIDField;
        
        private IdentifierType componentIDField;
        
        private IdentifierType taskIDField;
        
        private IdentifierType referenceIDField;
        
        private TransConfirmationCodeType confirmationCodeField;
        
        private IdentifierType authorizationIDField;
        
        public TransSenderType() {
            this.authorizationIDField = new IdentifierType();
            this.confirmationCodeField = new TransConfirmationCodeType();
            this.referenceIDField = new IdentifierType();
            this.taskIDField = new IdentifierType();
            this.componentIDField = new IdentifierType();
            this.logicalIDField = new IdentifierType();
        }
        
        public IdentifierType LogicalID {
            get {
                return this.logicalIDField;
            }
            set {
                this.logicalIDField = value;
            }
        }
        
        public IdentifierType ComponentID {
            get {
                return this.componentIDField;
            }
            set {
                this.componentIDField = value;
            }
        }
        
        public IdentifierType TaskID {
            get {
                return this.taskIDField;
            }
            set {
                this.taskIDField = value;
            }
        }
        
        public IdentifierType ReferenceID {
            get {
                return this.referenceIDField;
            }
            set {
                this.referenceIDField = value;
            }
        }
        
        public TransConfirmationCodeType ConfirmationCode {
            get {
                return this.confirmationCodeField;
            }
            set {
                this.confirmationCodeField = value;
            }
        }
        
        public IdentifierType AuthorizationID {
            get {
                return this.authorizationIDField;
            }
            set {
                this.authorizationIDField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(WorkScheduleIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(WorkRequestIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(VersionType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(StorageHierarchyScopeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(StorageLocationType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResourceIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResourceNetworkConnectionIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(QualificationTestSpecificationIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(PropertyIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductSegmentIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductionRequestIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductProductionRuleType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductProductionRuleIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProductionScheduleIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProcessSegmentIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(PhysicalAssetIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(PhysicalAssetClassIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(PhysicalAssetCapabilityTestSpecificationIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(PhysicalAssetActualIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(PersonnelClassIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(PersonNameType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(PersonIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ParameterIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(OperationsSegmentIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(OperationsScheduleIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(OperationsRequestIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(OperationsDefinitionIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaterialTestSpecificationIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaterialSubLotIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaterialSpecificationIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaterialRequirementIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaterialLotIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaterialDefinitionIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaterialClassIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaterialCapabilityIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaterialActualIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ManufacturingBillIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(EquipmentIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(EquipmentClassIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(EquipmentCapabilityTestSpecificationIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ConfidenceFactorType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(CertificateOfAnalysisReferenceType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(BillOfResourcesIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(BillOfMaterialsIDType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(BillOfMaterialIDType))]
    public partial class IdentifierType {
        
        private string schemeIDField;
        
        private string schemeNameField;
        
        private string schemeAgencyIDField;
        
        private string schemeAgencyNameField;
        
        private string schemeVersionIDField;
        
        private string schemeDataURIField;
        
        private string schemeURIField;
        
        private string valueField;
        
        public string schemeID {
            get {
                return this.schemeIDField;
            }
            set {
                this.schemeIDField = value;
            }
        }
        
        public string schemeName {
            get {
                return this.schemeNameField;
            }
            set {
                this.schemeNameField = value;
            }
        }
        
        public string schemeAgencyID {
            get {
                return this.schemeAgencyIDField;
            }
            set {
                this.schemeAgencyIDField = value;
            }
        }
        
        public string schemeAgencyName {
            get {
                return this.schemeAgencyNameField;
            }
            set {
                this.schemeAgencyNameField = value;
            }
        }
        
        public string schemeVersionID {
            get {
                return this.schemeVersionIDField;
            }
            set {
                this.schemeVersionIDField = value;
            }
        }
        
        public string schemeDataURI {
            get {
                return this.schemeDataURIField;
            }
            set {
                this.schemeDataURIField = value;
            }
        }
        
        public string schemeURI {
            get {
                return this.schemeURIField;
            }
            set {
                this.schemeURIField = value;
            }
        }
        
        [System.Xml.Serialization.XmlTextAttribute(DataType="normalizedString")]
        public string Value {
            get {
                return this.valueField;
            }
            set {
                this.valueField = value;
            }
        }
    }
    
    public partial class BODType {
        
        private TransApplicationAreaType originalApplicationAreaField;
        
        private List<TextType> descriptionField;
        
        private List<TextType> noteField;
        
        private TransUserAreaType userAreaField;
        
        public BODType() {
            this.userAreaField = new TransUserAreaType();
            this.noteField = new List<TextType>();
            this.descriptionField = new List<TextType>();
            this.originalApplicationAreaField = new TransApplicationAreaType();
        }
        
        public TransApplicationAreaType OriginalApplicationArea {
            get {
                return this.originalApplicationAreaField;
            }
            set {
                this.originalApplicationAreaField = value;
            }
        }
        
        public List<TextType> Description {
            get {
                return this.descriptionField;
            }
            set {
                this.descriptionField = value;
            }
        }
        
        public List<TextType> Note {
            get {
                return this.noteField;
            }
            set {
                this.noteField = value;
            }
        }
        
        public TransUserAreaType UserArea {
            get {
                return this.userAreaField;
            }
            set {
                this.userAreaField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(JobOrderCommandRuleType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(DescriptionType))]
    public partial class TextType {
        
        private string languageIDField;
        
        private string valueField;
        
        public string languageID {
            get {
                return this.languageIDField;
            }
            set {
                this.languageIDField = value;
            }
        }
        
        [System.Xml.Serialization.XmlTextAttribute()]
        public string Value {
            get {
                return this.valueField;
            }
            set {
                this.valueField = value;
            }
        }
    }
    
    public partial class JobOrderCommandRuleType : TextType {
    }
    
    public partial class DescriptionType : TextType {
    }
    
    public partial class TransUserAreaType {
        
        private List<System.Xml.XmlElement> anyField;
        
        public TransUserAreaType() {
            this.anyField = new List<System.Xml.XmlElement>();
        }
        
        [System.Xml.Serialization.XmlAnyElementAttribute()]
        public List<System.Xml.XmlElement> Any {
            get {
                return this.anyField;
            }
            set {
                this.anyField = value;
            }
        }
    }
    
    public partial class TransStateChangeType {
        
        private CodeType fromStateCodeField;
        
        private CodeType toStateCodeField;
        
        private DateTimeType changeDateTimeField;
        
        private List<DescriptionType> descriptionField;
        
        private List<TextType> noteField;
        
        private TransUserAreaType userAreaField;
        
        public TransStateChangeType() {
            this.userAreaField = new TransUserAreaType();
            this.noteField = new List<TextType>();
            this.descriptionField = new List<DescriptionType>();
            this.changeDateTimeField = new DateTimeType();
            this.toStateCodeField = new CodeType();
            this.fromStateCodeField = new CodeType();
        }
        
        public CodeType FromStateCode {
            get {
                return this.fromStateCodeField;
            }
            set {
                this.fromStateCodeField = value;
            }
        }
        
        public CodeType ToStateCode {
            get {
                return this.toStateCodeField;
            }
            set {
                this.toStateCodeField = value;
            }
        }
        
        public DateTimeType ChangeDateTime {
            get {
                return this.changeDateTimeField;
            }
            set {
                this.changeDateTimeField = value;
            }
        }
        
        public List<DescriptionType> Description {
            get {
                return this.descriptionField;
            }
            set {
                this.descriptionField = value;
            }
        }
        
        public List<TextType> Note {
            get {
                return this.noteField;
            }
            set {
                this.noteField = value;
            }
        }
        
        public TransUserAreaType UserArea {
            get {
                return this.userAreaField;
            }
            set {
                this.userAreaField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(TransConfirmationCodeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(WorkType1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(WorkTypeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(UnitOfMeasureType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(StatusType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResponseState1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResponseStateType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResourcesType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResourceReferenceType1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResourceReferenceTypeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(RequiredByRequestedSegmentResponse1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(RequiredByRequestedSegmentResponseType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(RequestState1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(RequestStateType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(RelationshipType1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(RelationshipTypeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(RelationshipForm1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(RelationshipFormType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ReasonType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ProblemType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(PhysicalAssetUseType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(PersonnelUseType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(OtherDependencyType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(OperationsType1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(OperationsTypeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaterialUse1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaterialUseType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(JobOrderDispatchStatusType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(JobOrderCommand1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(JobOrderCommandType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(EquipmentUseType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(EquipmentElementLevel1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(EquipmentElementLevelType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(Dependency1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(DependencyType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(DataType1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(DataTypeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(CorrectionType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(CauseType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(CapabilityType1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(CapabilityTypeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssemblyType1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssemblyTypeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssemblyRelationship1Type))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssemblyRelationshipType))]
    public partial class CodeType {
        
        private string listIDField;
        
        private string listAgencyIDField;
        
        private string listAgencyNameField;
        
        private string listNameField;
        
        private string listVersionIDField;
        
        private string nameField;
        
        private string languageIDField;
        
        private string listURIField;
        
        private string listSchemeURIField;
        
        private string valueField;
        
        public string listID {
            get {
                return this.listIDField;
            }
            set {
                this.listIDField = value;
            }
        }
        
        public string listAgencyID {
            get {
                return this.listAgencyIDField;
            }
            set {
                this.listAgencyIDField = value;
            }
        }
        
        public string listAgencyName {
            get {
                return this.listAgencyNameField;
            }
            set {
                this.listAgencyNameField = value;
            }
        }
        
        public string listName {
            get {
                return this.listNameField;
            }
            set {
                this.listNameField = value;
            }
        }
        
        public string listVersionID {
            get {
                return this.listVersionIDField;
            }
            set {
                this.listVersionIDField = value;
            }
        }
        
        public string name {
            get {
                return this.nameField;
            }
            set {
                this.nameField = value;
            }
        }
        
        public string languageID {
            get {
                return this.languageIDField;
            }
            set {
                this.languageIDField = value;
            }
        }
        
        public string listURI {
            get {
                return this.listURIField;
            }
            set {
                this.listURIField = value;
            }
        }
        
        public string listSchemeURI {
            get {
                return this.listSchemeURIField;
            }
            set {
                this.listSchemeURIField = value;
            }
        }
        
        [System.Xml.Serialization.XmlTextAttribute(DataType="normalizedString")]
        public string Value {
            get {
                return this.valueField;
            }
            set {
                this.valueField = value;
            }
        }
    }
    
    public partial class TransConfirmationCodeType : CodeType {
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(WorkTypeType))]
    public partial class WorkType1Type : CodeType {
    }
    
    public partial class WorkTypeType : WorkType1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    public partial class UnitOfMeasureType : CodeType {
    }
    
    public partial class StatusType : CodeType {
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResponseStateType))]
    public partial class ResponseState1Type : CodeType {
    }
    
    public partial class ResponseStateType : ResponseState1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    public partial class ResourcesType : CodeType {
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResourceReferenceTypeType))]
    public partial class ResourceReferenceType1Type : CodeType {
    }
    
    public partial class ResourceReferenceTypeType : ResourceReferenceType1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(RequiredByRequestedSegmentResponseType))]
    public partial class RequiredByRequestedSegmentResponse1Type : CodeType {
    }
    
    public partial class RequiredByRequestedSegmentResponseType : RequiredByRequestedSegmentResponse1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(RequestStateType))]
    public partial class RequestState1Type : CodeType {
    }
    
    public partial class RequestStateType : RequestState1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(RelationshipTypeType))]
    public partial class RelationshipType1Type : CodeType {
    }
    
    public partial class RelationshipTypeType : RelationshipType1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(RelationshipFormType))]
    public partial class RelationshipForm1Type : CodeType {
    }
    
    public partial class RelationshipFormType : RelationshipForm1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    public partial class ReasonType : CodeType {
    }
    
    public partial class ProblemType : CodeType {
    }
    
    public partial class PhysicalAssetUseType : CodeType {
    }
    
    public partial class PersonnelUseType : CodeType {
    }
    
    public partial class OtherDependencyType : CodeType {
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(OperationsTypeType))]
    public partial class OperationsType1Type : CodeType {
    }
    
    public partial class OperationsTypeType : OperationsType1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(MaterialUseType))]
    public partial class MaterialUse1Type : CodeType {
    }
    
    public partial class MaterialUseType : MaterialUse1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    public partial class JobOrderDispatchStatusType : CodeType {
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(JobOrderCommandType))]
    public partial class JobOrderCommand1Type : CodeType {
    }
    
    public partial class JobOrderCommandType : JobOrderCommand1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    public partial class EquipmentUseType : CodeType {
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(EquipmentElementLevelType))]
    public partial class EquipmentElementLevel1Type : CodeType {
    }
    
    public partial class EquipmentElementLevelType : EquipmentElementLevel1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(DependencyType))]
    public partial class Dependency1Type : CodeType {
    }
    
    public partial class DependencyType : Dependency1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(DataTypeType))]
    public partial class DataType1Type : CodeType {
    }
    
    public partial class DataTypeType : DataType1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    public partial class CorrectionType : CodeType {
    }
    
    public partial class CauseType : CodeType {
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(CapabilityTypeType))]
    public partial class CapabilityType1Type : CodeType {
    }
    
    public partial class CapabilityTypeType : CapabilityType1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssemblyTypeType))]
    public partial class AssemblyType1Type : CodeType {
    }
    
    public partial class AssemblyTypeType : AssemblyType1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(AssemblyRelationshipType))]
    public partial class AssemblyRelationship1Type : CodeType {
    }
    
    public partial class AssemblyRelationshipType : AssemblyRelationship1Type {
        
        private string otherValueField;
        
        public string OtherValue {
            get {
                return this.otherValueField;
            }
            set {
                this.otherValueField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(TestDateTimeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(StatusTimeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(StartTimeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(RequestedCompletionDateType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(PublishedDateType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(PlannedStartTimeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(PlannedFinishTimeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(LatestEndTimeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ExpirationTimeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(EndTimeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(EarliestStartTimeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActualStartTimeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActualFinishTimeType))]
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActualEndTimeType))]
    public partial class DateTimeType {
        
        private string formatField;
        
        private System.DateTime valueField;
        
        public string format {
            get {
                return this.formatField;
            }
            set {
                this.formatField = value;
            }
        }
        
        [System.Xml.Serialization.XmlTextAttribute()]
        public System.DateTime Value {
            get {
                return this.valueField;
            }
            set {
                this.valueField = value;
            }
        }
    }
    
    public partial class TestDateTimeType : DateTimeType {
    }
    
    public partial class StatusTimeType : DateTimeType {
    }
    
    public partial class StartTimeType : DateTimeType {
    }
    
    public partial class RequestedCompletionDateType : DateTimeType {
    }
    
    public partial class PublishedDateType : DateTimeType {
    }
    
    public partial class PlannedStartTimeType : DateTimeType {
    }
    
    public partial class PlannedFinishTimeType : DateTimeType {
    }
    
    public partial class LatestEndTimeType : DateTimeType {
    }
    
    public partial class ExpirationTimeType : DateTimeType {
    }
    
    public partial class EndTimeType : DateTimeType {
    }
    
    public partial class EarliestStartTimeType : DateTimeType {
    }
    
    public partial class ActualStartTimeType : DateTimeType {
    }
    
    public partial class ActualFinishTimeType : DateTimeType {
    }
    
    public partial class ActualEndTimeType : DateTimeType {
    }
    
    public partial class TransChangeStatusType {
        
        private CodeType codeField;
        
        private DescriptionType descriptionField;
        
        private DateTimeType effectiveDateTimeField;
        
        private CodeType reasonCodeField;
        
        private List<CodeType> reasonField;
        
        private List<TransStateChangeType> stateChangeField;
        
        private TransUserAreaType userAreaField;
        
        public TransChangeStatusType() {
            this.userAreaField = new TransUserAreaType();
            this.stateChangeField = new List<TransStateChangeType>();
            this.reasonField = new List<CodeType>();
            this.reasonCodeField = new CodeType();
            this.effectiveDateTimeField = new DateTimeType();
            this.descriptionField = new DescriptionType();
            this.codeField = new CodeType();
        }
        
        public CodeType Code {
            get {
                return this.codeField;
            }
            set {
                this.codeField = value;
            }
        }
        
        public DescriptionType Description {
            get {
                return this.descriptionField;
            }
            set {
                this.descriptionField = value;
            }
        }
        
        public DateTimeType EffectiveDateTime {
            get {
                return this.effectiveDateTimeField;
            }
            set {
                this.effectiveDateTimeField = value;
            }
        }
        
        public CodeType ReasonCode {
            get {
                return this.reasonCodeField;
            }
            set {
                this.reasonCodeField = value;
            }
        }
        
        public List<CodeType> Reason {
            get {
                return this.reasonField;
            }
            set {
                this.reasonField = value;
            }
        }
        
        public List<TransStateChangeType> StateChange {
            get {
                return this.stateChangeField;
            }
            set {
                this.stateChangeField = value;
            }
        }
        
        public TransUserAreaType UserArea {
            get {
                return this.userAreaField;
            }
            set {
                this.userAreaField = value;
            }
        }
    }
    
    [System.Xml.Serialization.XmlIncludeAttribute(typeof(TransExpressionType))]
    public partial class TransExpression1Type {
        
        private string valueField;
        
        [System.Xml.Serialization.XmlTextAttribute(DataType="token")]
        public string Value {
            get {
                return this.valueField;
            }
            set {
                this.valueField = value;
            }
        }
    }
    
    public partial class TransExpressionType : TransExpression1Type {
        
        private string actionCodeField;
        
        private string expressionLanguageField;
        
        public string actionCode {
            get {
                return this.actionCodeField;
            }
            set {
                this.actionCodeField = value;
            }
        }
        
        public string expressionLanguage {
            get {
                return this.expressionLanguageField;
            }
            set {
                this.expressionLanguageField = value;
            }
        }
    }
    
    public partial class TransResponseCriteriaType {
        
        private TransExpressionType responseExpressionField;
        
        private TransChangeStatusType changeStatusField;
        
        public TransResponseCriteriaType() {
            this.changeStatusField = new TransChangeStatusType();
            this.responseExpressionField = new TransExpressionType();
        }
        
        public TransExpressionType ResponseExpression {
            get {
                return this.responseExpressionField;
            }
            set {
                this.responseExpressionField = value;
            }
        }
        
        public TransChangeStatusType ChangeStatus {
            get {
                return this.changeStatusField;
            }
            set {
                this.changeStatusField = value;
            }
        }
    }
    
    public partial class TransConfirmType {
        
        private TransApplicationAreaType originalApplicationAreaField;
        
        private List<TransResponseCriteriaType> responseCriteriaField;
        
        public TransConfirmType() {
            this.responseCriteriaField = new List<TransResponseCriteriaType>();
            this.originalApplicationAreaField = new TransApplicationAreaType();
        }
        
        public TransApplicationAreaType OriginalApplicationArea {
            get {
                return this.originalApplicationAreaField;
            }
            set {
                this.originalApplicationAreaField = value;
            }
        }
        
        public List<TransResponseCriteriaType> ResponseCriteria {
            get {
                return this.responseCriteriaField;
            }
            set {
                this.responseCriteriaField = value;
            }
        }
    }
    
    public partial class TransSignatureType {
        
        private List<System.Xml.XmlElement> anyField;
        
        private string qualifyingAgencyIDField;
        
        public TransSignatureType() {
            this.anyField = new List<System.Xml.XmlElement>();
        }
        
        [System.Xml.Serialization.XmlAnyElementAttribute()]
        public List<System.Xml.XmlElement> Any {
            get {
                return this.anyField;
            }
            set {
                this.anyField = value;
            }
        }
        
        public string qualifyingAgencyID {
            get {
                return this.qualifyingAgencyIDField;
            }
            set {
                this.qualifyingAgencyIDField = value;
            }
        }
    }
    
    public partial class TransReceiverType {
        
        private IdentifierType logicalIDField;
        
        private IdentifierType componentIDField;
        
        private List<IdentifierType> idField;
        
        public TransReceiverType() {
            this.idField = new List<IdentifierType>();
            this.componentIDField = new IdentifierType();
            this.logicalIDField = new IdentifierType();
        }
        
        public IdentifierType LogicalID {
            get {
                return this.logicalIDField;
            }
            set {
                this.logicalIDField = value;
            }
        }
        
        public IdentifierType ComponentID {
            get {
                return this.componentIDField;
            }
            set {
                this.componentIDField = value;
            }
        }
        
        public List<IdentifierType> ID {
            get {
                return this.idField;
            }
            set {
                this.idField = value;
            }
        }
    }
    
    public partial class WorkScheduleIDType : IdentifierType {
    }
    
    public partial class WorkRequestIDType : IdentifierType {
    }
    
    public partial class VersionType : IdentifierType {
    }
    
    public partial class StorageHierarchyScopeType : IdentifierType {
    }
    
    public partial class StorageLocationType : IdentifierType {
    }
    
    public partial class ResourceIDType : IdentifierType {
    }
    
    public partial class ResourceNetworkConnectionIDType : IdentifierType {
    }
    
    public partial class QualificationTestSpecificationIDType : IdentifierType {
    }
    
    public partial class PropertyIDType : IdentifierType {
    }
    
    public partial class ProductSegmentIDType : IdentifierType {
    }
    
    public partial class ProductionRequestIDType : IdentifierType {
    }
    
    public partial class ProductProductionRuleType : IdentifierType {
    }
    
    public partial class ProductProductionRuleIDType : IdentifierType {
    }
    
    public partial class ProductionScheduleIDType : IdentifierType {
    }
    
    public partial class ProcessSegmentIDType : IdentifierType {
    }
    
    public partial class PhysicalAssetIDType : IdentifierType {
    }
    
    public partial class PhysicalAssetClassIDType : IdentifierType {
    }
    
    public partial class PhysicalAssetCapabilityTestSpecificationIDType : IdentifierType {
    }
    
    public partial class PhysicalAssetActualIDType : IdentifierType {
    }
    
    public partial class PersonnelClassIDType : IdentifierType {
    }
    
    public partial class PersonNameType : IdentifierType {
    }
    
    public partial class PersonIDType : IdentifierType {
    }
    
    public partial class ParameterIDType : IdentifierType {
    }
    
    public partial class OperationsSegmentIDType : IdentifierType {
    }
    
    public partial class OperationsScheduleIDType : IdentifierType {
    }
    
    public partial class OperationsRequestIDType : IdentifierType {
    }
    
    public partial class OperationsDefinitionIDType : IdentifierType {
    }
    
    public partial class MaterialTestSpecificationIDType : IdentifierType {
    }
    
    public partial class MaterialSubLotIDType : IdentifierType {
    }
    
    public partial class MaterialSpecificationIDType : IdentifierType {
    }
    
    public partial class MaterialRequirementIDType : IdentifierType {
    }
    
    public partial class MaterialLotIDType : IdentifierType {
    }
    
    public partial class MaterialDefinitionIDType : IdentifierType {
    }
    
    public partial class MaterialClassIDType : IdentifierType {
    }
    
    public partial class MaterialCapabilityIDType : IdentifierType {
    }
    
    public partial class MaterialActualIDType : IdentifierType {
    }
    
    public partial class ManufacturingBillIDType : IdentifierType {
    }
    
    public partial class EquipmentIDType : IdentifierType {
    }
    
    public partial class EquipmentClassIDType : IdentifierType {
    }
    
    public partial class EquipmentCapabilityTestSpecificationIDType : IdentifierType {
    }
    
    public partial class ConfidenceFactorType : IdentifierType {
    }
    
    public partial class CertificateOfAnalysisReferenceType : IdentifierType {
    }
    
    public partial class BillOfResourcesIDType : IdentifierType {
    }
    
    public partial class BillOfMaterialsIDType : IdentifierType {
    }
    
    public partial class BillOfMaterialIDType : IdentifierType {
    }
    
    public partial class ConfirmBODTypeDataArea {
        
        private TransConfirmType confirmField;
        
        private List<BODType> bODField;
        
        public ConfirmBODTypeDataArea() {
            this.bODField = new List<BODType>();
            this.confirmField = new TransConfirmType();
        }
        
        public TransConfirmType Confirm {
            get {
                return this.confirmField;
            }
            set {
                this.confirmField = value;
            }
        }
        
        public List<BODType> BOD {
            get {
                return this.bODField;
            }
            set {
                this.bODField = value;
            }
        }
    }
}

Jak zrobić serializację tego pliku?

marroz28