O'Reilly logo

XML and Perl by Ilya Sterin, Mark Riehl

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Examples of XML Document Generation

In this section, I’m going to present a few examples that demonstrate the different approaches to generating XML data. While going through the examples, try to keep the advantages and disadvantages of each approach in mind. First, let’s take a look at generating an XML document by using the Perl print function.

Using the Perl print Function

No, don’t worry; if you are reading this section, you are not necessarily crazy, but rather enjoy exploring things. Using Perl’s print function to generate XML data can be time saving, and at other times, time consuming. It all depends on the task. Just follow the famous advice, “Use the right tool for the right job,” and make the right choice.

If your requirement is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required