Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

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

I have no problem with people who know what they are doing using regexps on consenting XML, within the privacy of their own job. If they really know what they are doing, all will be well. If they don't, then they've brought it upon themselves, they have to deal with it. I just have problems with people posting that kind of code, as it will lead people who really don't know what they're doing to think that this is a proper way to deal with XML. This would be indecent exposure if I may push the analogy a little too far ;--)

BTW, if you can't install libxml2 (on which XML::LibXML is based), then try an expat based module, preferably XML::Twig of course ;--) On Windows, XML::Parser comes pre-installed with Activestate Perl. On any sensible platform that includes a compiler, both expat and libxml2 should install easily. XML libraries are generally not over-engineered, it's just that most custom code is under-engineered, not dealing with XML but for a very limited, and usually un-specified subset of XML (no comments, no nested tags, no mixed content are common limitations).

And if you didn't like my tongue-in-cheek police reference, how about calling my original answer a "consumer report" advice to recall the original code, would that fare better with you?


In reply to Re^3: XML element replacement by mirod
in thread XML element replacement by stevee

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 making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-18 02:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found