xsd(1)

πŸ’– xsd(1) β€” bestie's guide to Mono's schema/class-file generator πŸ’–

ok so like. this is xsd, the Mono utility that generates schemas or class files. yes it shares a name with that one XML Schema thing, no they are not the same, we move. πŸŽ€


✨ SYNOPSIS ✨

xsd <schema.xsd> /classes [options]

xsd <schema.xsd> /dataset [options]

xsd <assembly>.dll|<assembly>.exe [options]

xsd <instance.xml> [<instance.xml> ...] [options]

🌸 DESCRIPTION 🌸

so xsd is a tool that's intended to complement the XML serialization support of Mono. it's giving sidekick energy but honestly it's the main character of this whole situation. here's what it can do for you:

  • Generate serializable classes β€” from a given XML schema, it generates a class you can use to read and write xml documents that conform to that schema (that's the /classes option, periodt πŸ’…).
  • Generate typed datasets β€” from a given XML schema, it generates a typed DataSet class you can use to read and write xml documents that conform to that schema (that's the /dataset option, iconic).
  • Generate XML schemas β€” from a given assembly and an optional type name, it generates an XML schema you can use to validate the xml documents you can get by serializing objects of that type. if you don't provide a type, xsd generates a schema for all types in the assembly. okay and this part is important bestie: when you specify the assembly name, do not include the file extension (.dll or .exe). xsd will look for the assembly using the standard assembly loading rules. no cap. πŸ¦‹
  • Infer XML schemas β€” from a given set of XML documents, it infers the XML schema you can use to validate those documents. it's literally reading the vibes of your XML and writing them down. πŸ”₯

⭐ OPTIONS ⭐

the following options are available:

  • /element:name, /e:name β€” specifies the name of the XML schema element for which a class or a dataset has to be generated. tell it which element, bestie, it can't read your mind.
  • /namespace:name, /n:name β€” specifies the namespace of the XML schema element for which a class or a dataset has to be generated.
  • /language:name, /l:name β€” specifies the programming language to use for the generated code. the only supported languages are CS (C#) and VB (Visual Basic.NET). so sorry to everyone else, that's the whole guest list. 😭
  • /generator:type,assembly, /g:type,assembly β€” tells xsd.exe to use a custom CodeDomProvider to generate code. the type name must be the full name. assembly name is a local file name that's going to be loaded. the specified Type must have the default constructor. no default constructor, no party. πŸ™ˆ
  • /outputdir:path, /o:path β€” specifies the directory where to generate the code or schemas. put your little files somewhere cute. πŸ’–
  • /type:name, /t:name β€” specifies the full name of the type (including namespace) for which to generate the XML schema. full name, including namespace, don't skip the namespace part. πŸ‘‘
  • /help, /h β€” show usage help. the classic. always here for you. ✨

🫢 AUTHORS 🫢

these legends built it:

  • Lluis Sanchez Gual (lluis@ximian.com)
  • Atsushi Enomoto (atsushi@ximian.com)

🌈 LICENSE 🌈

xsd is released under the terms of the GNU GPL. slay. legally. βš–οΈπŸ’–


🧚 SEE ALSO 🧚

go read those too, they're in the group chat. πŸ’…


ok that's the whole page bestie, you ate that. this has been xsd(1) from the Mono manual β€” that's the one and only, the header up top and the footer down here both say xsd(1) and honestly? consistent queen. πŸŽ€βœ¨πŸ’œ