in reply to XML::Compile template initialized from XML document

"Template" in XML::Compile is not provided as "fill this in" HASH, but as example of the expected message. Schema's can be horribly complex, sometimes for much simpler actual message structures. So, template() is a helper during development, not the solution.

What most people do, is producing the example via template(), and then write a program which smartly produces a structure like that. If you get runtime errors about your generated structure, it is easier to search for possible mistakes.

  • Comment on Re: XML::Compile template initialized from XML document