{"id":14063989,"url":"https://github.com/LaurentDardenne/XMLObject","last_synced_at":"2025-07-29T17:31:25.086Z","repository":{"id":174168725,"uuid":"67955021","full_name":"LaurentDardenne/XMLObject","owner":"LaurentDardenne","description":"Convert a xml file to a C# class and vice versa.","archived":false,"fork":false,"pushed_at":"2017-06-17T07:04:19.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-12T14:33:16.475Z","etag":null,"topics":["powershell","powershell-modules","wrapper","xml","xsd"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LaurentDardenne.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-09-11T21:21:02.000Z","updated_at":"2023-02-07T20:36:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"38633795-8494-43f6-bcfa-9b7781e19df1","html_url":"https://github.com/LaurentDardenne/XMLObject","commit_stats":null,"previous_names":["laurentdardenne/xmlobject"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FXMLObject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FXMLObject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FXMLObject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FXMLObject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LaurentDardenne","download_url":"https://codeload.github.com/LaurentDardenne/XMLObject/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228032919,"owners_count":17858917,"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":["powershell","powershell-modules","wrapper","xml","xsd"],"created_at":"2024-08-13T07:03:36.707Z","updated_at":"2024-12-04T02:30:59.534Z","avatar_url":"https://github.com/LaurentDardenne.png","language":"PowerShell","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"readme":"﻿# XMLObject\nConvert a xml file to a C# class and vice versa.\n\nTo install this module :\n```Powershell\n$PSGalleryPublishUri = 'https://www.myget.org/F/ottomatt/api/v2/package'\n$PSGallerySourceUri = 'https://www.myget.org/F/ottomatt/api/v2'\n\nRegister-PSRepository -Name OttoMatt -SourceLocation $PSGallerySourceUri -PublishLocation $PSGalleryPublishUri #-InstallationPolicy Trusted\nInstall-Module XMLObject -Repository OttoMatt\n```\n\nNeed an xsd file and the dotnet tools xsd.exe.\n```powershell\n#First step\n cd c:\\temp\n nuget install NuGet.Manifest.Schema\n $XsdFile='c:\\temp\\NuGet.Manifest.Schema.2.0.4\\Content\\nuspec.2011.8.xsd'\n \u0026\"C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.1A\\bin\\NETFX 4.5.1 Tools\\xsd.exe\" $XsdFile /Classes /language:CS\n #Compile 'nuspec_2011_8.cs' to  NugetSchemas.dll \n Add-type -path 'C:\\temp\\nuspec_2011_8.cs' -OutputAssembly 'C:\\temp\\NugetSchemas.dll' -OutputType Library -ReferencedAssemblies ([Xml].Assembly.Location)\n \n# Second step\n$XsdFile='G:\\PS\\Nuget\\nuspec.2011.8.xsd'\n$Filename='G:\\PS\\Nuget\\TestNuget.nuspec'  \nAdd-type -path G:\\PS\\Nuget\\NugetSchemas.dll\n\nImport-Module XMLObject\n\n #XML file to a C# class\n$Nuspec=ConvertTo-Object -Filename $FileName -SchemaFile $xsdFile -targetNamespace \"http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd\" -SerializedType 'NugetSchemas.package' \n $Nuspec.metadata.title='Test'\n #A C# class to a XML file \nConvertTo-XML -Object $Nuspec -Filename $FileName -SerializedType 'NugetSchemas.package' -targetNamespace \"http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLaurentDardenne%2FXMLObject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLaurentDardenne%2FXMLObject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLaurentDardenne%2FXMLObject/lists"}