Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jdavidb (1361)

jdavidb
  (email not shown publicly)
http://voiceofjohn.blogspot.com/

J. David Blackstone has a Bachelor of Science in Computer Science and Engineering and nine years of experience at a wireless telecommunications company, where he learned Perl and never looked back. J. David has an advantage in that he works really hard, he has a passion for writing good software, and he knows many of the world's best Perl programmers.

Journal of jdavidb (1361)

Monday August 26, 2002
08:21 AM

SAX and other XML APIs too low level?

[ #7315 ]

Kip Hampton's review of the state of Perl and XML at OSCON states that SAX and most other currently available Perl APIs for XML are too low level:

It's hard to argue with complaints that the standard XML APIs are not high-level enough. SAX provides an excellent bridge between Perl's other data processing facilities and XML, but the hoops that you often have to jump through to maintain context while processing some documents can get very ugly very fast. The code required to generate well-formed XML documents by directly firing the appropriate SAX events is tedious and error-prone in all but the simplest cases.

Opinions? Is this a valid assessment? Matt always makes it sound so easy. :) I'm not there yet, so I just want to know.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • It's not that it hard right now, it's that you can only work at the XML syntax level, and that gets tedious fast (and you can shoot yourself in the foot). I can write a SAX handler in a handful of minutes, it's not hard once you get the hang of it. But it's true that higher-level tools would certainly help people. Now, as for what those tools would be, I have no idea :)

    --

    -- Robin Berjon [berjon.com]

  • The code required to generate well-formed XML documents by directly firing the appropriate SAX events is tedious and error-prone in all but the simplest cases.


    Yes, it's tedious and error prone, but this type of XML to XML translation is better handled by XSLT.