SCHEMA2EXAMPLE(1p)
π 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,-xfilename β the file that contains the xml message. a single dash means"stdin"π«Ά--schema,-sfilename(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,-tTYPE β 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,-ofilename β by default, the output is to stdout. classic. π--showSTRING β 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
- debian trixie: libxml-compile-perl 1.64-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libxml-compile-perl 1.64-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libxml-compile-perl 1.64-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms