Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

You don't seem to agree, but I really think that posting on PerlMonks comes with some responsibilities: as with every printed medium, you don't know who is going to read the posts (nor when), and you have no way to correct them if they think that index and substr are a proper way to process XML. Posting code with a bad design is no different from posting broken code. In fact I would think that it is even worse, as unsuspecting readers can try it out, see that it works and use it as a base for their own code.

These snippets are similar in a way to those countless attempts at parsing CGI parameters: this is just not the way to do it. Use CGI, use XML::Parser and its friends.

Just to show you the effect of your posts: imagine a good Perl programer browsing the snippets through the PMSI, looking for a way to get started with XML: this is what they get... I don't think you are doing him/her a service!

You can of course think different (of course you do ;--), but I thought it was important to add a correction after your snippet (and a -- vote).

As for the fact that you already posted a proper version of those tools... well, I just hadn't realized that podmaster is really crazyinsomniac in disguise ;--)


In reply to Re: Re: Re: parse the "Other Users XML Ticker" with index and substr by mirod
in thread parse the "Other Users XML Ticker" with index and substr by PodMaster

Title:
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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-23 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found