Richard Searle's Blog

Thoughts about software

How not to extend Scala XML

Posted by eggsearle on September 6, 2010

The first step in considering how to better integrate Scala and Java XML processing is a Google search to find the prior art.

That found the following gem. The scala.xml.Elem is prettyprinted to a String and then parsed into a DOM for processing by the Java xpath implementation.

This code illustrates a common concern with tools that hide the implementation details; they often hide significant performance problems. It might be argued that Scala implicit conversions will make this anti-pattern a common occurrence.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: