Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

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

Respectfully we all know you have a bee in your bonnet about the DOM ;-). But regardless of the problems processing XML with the DOM brings up, I'm not entirely sure that covering those problems in the presented code would be the best way to do it -- I can't stand books that present massively long examples -- I'd much rather be given something simple I can build on. Perhaps a box-out would be better though. I haven't read this book yet, but I will be sure to suggest that to Ilya as a change for the second edition.

As far as encodings go, I seem to recall reading that the book covers this by simply stating that all XML parsers return their data in UTF-8, regardless of the input encoding, but then I've only flicked through it on the bookshelves so I can't be sure. I get the feeling that because XML::Twig deals with the encodings issue by messing with the original_string (which is possibly scarier than the alternatives of just leaving things in UTF-8) that you think it's terribly important that this be covered in detail, when I think that in the majority of situations people need to come out of their encoding-specific shells and get used to the world of unicode. I'd treat someone coding in perl4 style the same way.

Regarding discussing why you would want to use XSLT, I'd rather keep this out of a technical book. This is a wishy washy issue, and I'd rather just get into the code, thanks. I guess mileage varies on this - personally I prefer nutshell-style books that just get down and dirty without any discussion of the whys.

Overall I think your response is rather damning of what is a much better book than "Perl and XML" from O'Reilly, and given the choice of the two I'd pick this book any day.

All, respectfully, IMHO ;-)


In reply to Re: Re: XML and Perl by Matts
in thread XML and Perl by davorg

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 scrutinizing the Monastery: (4)
As of 2024-04-20 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found