{"id":15823764,"url":"https://github.com/stefh/xsdclassgentest","last_synced_at":"2025-04-01T08:20:55.533Z","repository":{"id":149586607,"uuid":"158562742","full_name":"StefH/XsdClassGenTest","owner":"StefH","description":"XsdClassGen Test project","archived":false,"fork":false,"pushed_at":"2018-11-21T15:11:28.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T13:08:23.368Z","etag":null,"topics":["class","deserializer","generation","generator","serializer","xml","xsd","xsd-files","xsdclassgen"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StefH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-11-21T14:44:57.000Z","updated_at":"2018-11-21T15:11:30.000Z","dependencies_parsed_at":"2023-09-24T07:17:18.722Z","dependency_job_id":null,"html_url":"https://github.com/StefH/XsdClassGenTest","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"498bcbfb2e03b6d808a492fd69d3c1cffbe274d7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FXsdClassGenTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FXsdClassGenTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FXsdClassGenTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FXsdClassGenTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StefH","download_url":"https://codeload.github.com/StefH/XsdClassGenTest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246604618,"owners_count":20804101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["class","deserializer","generation","generator","serializer","xml","xsd","xsd-files","xsdclassgen"],"created_at":"2024-10-05T08:22:45.546Z","updated_at":"2025-04-01T08:20:55.503Z","avatar_url":"https://github.com/StefH.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XsdClassGenTest\nXsdClassGen Test project based on https://gitlab.com/pommalabs/xsdclassgen (which is based on https://www.nuget.org/packages/XsdClassGen)\n\n##### Modifications:\n- remove generation from the serialization classes and implemented a simple generic `XmlConverter` class.\n\n\n### Example\n\n#### XSD\n``` xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cxsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n           xmlns:tns=\"http://tempuri.org/PurchaseOrderSchema.xsd\"\n           targetNamespace=\"http://tempuri.org/PurchaseOrderSchema.xsd\"\n           elementFormDefault=\"qualified\"\u003e\n  \u003cxsd:element name=\"PurchaseOrder\" type=\"tns:PurchaseOrder\"/\u003e\n  \u003cxsd:complexType name=\"PurchaseOrder\"\u003e\n    \u003cxsd:sequence\u003e\n      \u003cxsd:element name=\"ShipTo\" type=\"tns:USAddress\" maxOccurs=\"2\"/\u003e\n      \u003cxsd:element name=\"BillTo\" type=\"tns:USAddress\"/\u003e\n    \u003c/xsd:sequence\u003e\n    \u003cxsd:attribute name=\"OrderDate\" type=\"xsd:date\"/\u003e\n  \u003c/xsd:complexType\u003e\n\n  \u003cxsd:element name=\"USAddress\" type=\"tns:USAddress\"/\u003e\n  \u003cxsd:complexType name=\"USAddress\"\u003e\n    \u003cxsd:sequence\u003e\n      \u003cxsd:element name=\"name\"   type=\"xsd:string\"/\u003e\n      \u003cxsd:element name=\"street\" type=\"xsd:string\"/\u003e\n      \u003cxsd:element name=\"city\"   type=\"xsd:string\"/\u003e\n      \u003cxsd:element name=\"state\"  type=\"xsd:string\"/\u003e\n      \u003cxsd:element name=\"zip\"    type=\"xsd:int\"/\u003e\n      \u003cxsd:element name=\"zip2\"   type=\"xsd:int\" nillable=\"true\"/\u003e\n    \u003c/xsd:sequence\u003e\n    \u003cxsd:attribute name=\"country\" type=\"xsd:NMTOKEN\" fixed=\"US\"/\u003e\n  \u003c/xsd:complexType\u003e\n\u003c/xsd:schema\u003e\n```\n#### Generated c# Code\n``` c#\nnamespace MySpecialDomainNamespace {\n    \n    \n    /// \u003csummary\u003e\n    ///   Automatically generated XML type mapping for PurchaseOrder.\n    /// \u003c/summary\u003e\n    /// \u003cremarks\u003e\n    ///   This is an automaticaly generated type, please do not edit it.\n    /// \u003c/remarks\u003e\n    [System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"4.7.3056.0\")]\n    [System.SerializableAttribute()]\n    [System.Diagnostics.DebuggerStepThroughAttribute()]\n    [System.Xml.Serialization.XmlTypeAttribute(Namespace=\"http://tempuri.org/PurchaseOrderSchema.xsd\")]\n    [System.Xml.Serialization.XmlRootAttribute(Namespace=\"http://tempuri.org/PurchaseOrderSchema.xsd\", IsNullable=true)]\n    public partial class PurchaseOrder {\n        \n        private USAddress[] shipToField;\n        \n        private USAddress billToField;\n        \n        private System.DateTime orderDateField;\n        \n        private bool orderDateFieldSpecified;\n        \n        /// \u003csummary\u003e\n        ///   Gets or sets ShipTo.\n        /// \u003c/summary\u003e\n        [System.Xml.Serialization.XmlElementAttribute(\"ShipTo\")]\n        public USAddress[] ShipTo {\n            get {\n                return this.shipToField;\n            }\n            set {\n                this.shipToField = value;\n            }\n        }\n\n        // More ...\n```\n\n### Usage\n\nThis code:\n``` c#\nvar p = new PurchaseOrder\n{\n    BillTo = new USAddress\n    {\n        country = \"NL\",\n        name = \"test\",\n        zip = 55656\n    }\n};\n\nstring s = XmlConverter.SerializeObject(p);\nConsole.WriteLine(s);\n```\n\nGenerates this XML:\n\n``` xml\n\u003cPurchaseOrder xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns=\"http://tempuri.org/PurchaseOrderSchema.xsd\"\u003e\n  \u003cBillTo country=\"NL\"\u003e\n    \u003cname\u003etest\u003c/name\u003e\n    \u003czip\u003e55656\u003c/zip\u003e\n    \u003czip2 xsi:nil=\"true\" /\u003e\n  \u003c/BillTo\u003e\n\u003c/PurchaseOrder\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Fxsdclassgentest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefh%2Fxsdclassgentest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Fxsdclassgentest/lists"}