SCHEMA2EXAMPLE(1p)

πŸ“¦
version 1.64 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– SCHEMA2EXAMPLE πŸ’–

okay so bestie, this is schema2example(1p) from the User Contributed Perl Documentation section β€” it's a lil command-line cutie that turns your XML schema knowledge into actual Perl or XML examples. slay.


✨ NAME ✨

schema2example β€” convert XML schema knowledge into Perl or XML examples πŸ¦‹


🌸 SYNOPSIS 🌸

schema2example xml-file schema-file(s)  >outfile

schema2example -x xml-file -s schema-file(s) -o outfile

πŸŽ€ DESCRIPTION πŸŽ€

ngl, XML schemas are quite hard to read β€” literally, and it gets so much worse when multiple name-spaces are involved 😭. good news tho: the template() function in XML::Compile::Schema can help you display the expected structure of a message, and this module is just a lil wrapper around that function. it's giving "helper for the helper". πŸ’…

πŸ’œ Options πŸ’œ

you've got two vibes to choose from, bestie: either you pass an XML message filename plus one or more schema filenames as plain arguments, or you use the options. pick your fighter. ✨

  • --xml, -x filename β€” the file that contains the xml message. a single dash means "stdin" 🫢
  • --schema, -s filename(s) β€” this option can be repeated, or you can separate the filenames with comma's, if you have more than one schema file to parse. important tho: all imported and included schema components have to be provided explicitly. no skipping, no vibes-based inference πŸ’€
  • --type, -t TYPE β€” the type of the root element. it's required if the XML is not namespaceo qualified, although the schema is. if you don't specify it, the root element is automatically inspected. πŸ‘‘

the TYPE notation is "{namespace}localname". and bestie, be warned: use quoting on the UNIX command-line, because curly braces have a special meaning for the shell πŸ™ˆ (your shell WILL eat them, fr fr).

  • --output, -o filename β€” by default, the output is to stdout. classic. 🌈
  • --show STRING β€” a comma separated list of comment components which should be included, by default "ALL". an empty string or "NONE" will exclude all comments. the STRING can also be a comma separated combination of "struct", "type", "occur", and "facets". mix and match, main character energy ⭐

πŸ¦‹ SEE ALSO πŸ¦‹

this module is part of Perl's XML-Compile distribution. Website: http://perl.overmeer.net/xml-compile/ πŸ”₯


πŸ‘‘ LICENSE πŸ‘‘

Copyrights 2008 by Mark Overmeer. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html


k that's the whole page, bestie πŸ’– go forth and make examples, no cap.

mwah πŸ’‹ β€” this was schema2example(1p), shipped with perl v5.40.0, dated 2024-10-27. iconic behavior, honestly. periodt.

πŸ“¦ where this page comes from