Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Thank you for this 'XML in perl show'. It is even more useful as a working example of integrating xml-sax in perl than as it's main purpose in this tutorial.

In order to preserve coherence with your first DBI example: at your third example you should correct the following:

$generator->execute('select foo as td,bar as td from baz');
Should be...
$generator->execute('select bar as td,baz as td from foo');
...and the output should read:
<table query="select bar as td,bas as td from foo"> <tr> <td>one</td> <td>1</td> </tr> <tr> <td>two</td> <td>2</td> </tr> <tr> <td>three</td> <td>3</td> </tr> </table>
intead of...
<table query="select foo as td,bar as td from baz"> <tr> <td>foo</td> <td>1</td> </tr> <tr> <td>bar</td> <td>2</td> </tr> <tr> <td>baz</td> <td>3</td> </tr> </table>
Am I wrong?

And, finally, if I understand your worries...

... Also, example 5 has a couple of known bugs: ... Also, opening and close <html> and <body> tags are generated when they too are not needed...
Should happen because your previous dynamic.xsl stylesheet has the <html> and <body> tags mentioned...

I hope that I have really :) contributed with this extraordinary tutorial. Thank you a lot!

In reply to Re: XML::Generator::DBI Tutorial by chanio
in thread XML::Generator::DBI Tutorial by jeffa

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2023-12-06 04:29 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (29 votes). Check out past polls.