in reply to
Generate XML code from a xschema
If you take a look at the XML, that should be a good place to start. It won't immediately do XML generation, but there are tools such as XML::Simple and XML::Twig that can be handy for you. Its difficult to tell you anything specific since you didn't provide any specific information.
Also, in the future, take a stab at getting what you want. When you get stuck, post what you have attempted and we will do our best to show you some options. But showing some effort is key here here. It would also help if you provided us with some example of what you wanted to do.