Skip to main content

Swept Away

Posted by editor on November 2, 2006 at 7:27 AM PST


Sweep through XML at build-time

Ken Arnold used to say that XML typified the tendency of all markup languages to devolve into prodcedural languages, and that Ant was a particuarly obvious example of that. Certainly, Java programmers put XML to a large number of uses: deployment descriptors, property and config files, messaging, serialization, and of course, as a build-scripting language with Ant.

Unsuprisingly, not only are many developers proficient with XML within their code, they also need to wrangle it throughout their development process. And after your Ant build.xml reaches a certain level of complexity, there's a good chance you'll want Ant itself to perform some sort of work on your XML files. And Ant's core tasks hit their limits pretty quickly.

In today's Feature Article, Brian Agnew shows off an Ant task that will help developers who need Ant to do some heavy lifting at build-time. In
XML Manipulation using XMLTask, he writes:

XMLTask was developed to provide a mechanism for changing XML files in a simple and consistent fashion, providing tools to help with commonly encountered requirements in Ant builds. XMLTask allows developers to identify sections of XML, then insert, remove, and cut/copy/paste content. Content can be read from files, and moved between XML documents.

Read on to see how this XPath-based approach allows you to add, remove, change, copy, paste, comment, uncomment, and otherwise wrangle your various XML files.


In Java Today,
the JavaTools community has just released the 100th issue of their community newsletter. To commemorate, the edition contains some special features: a "30 Days IDE Swap Experiment", in which four developers swap their IDEs for 30 days and tell us the story, "Two Years of JavaTools Statistics", in which Daniel Lopez shows some very interesting statistics from the community that give us some insight of what people look for in the Java universe, a new "From the Trenches" section, the Java developer Ibon Urrutia tells his pains and joys when making a real world JavaME application, and more.

Balloting is underway for the 2006 JCP Elections. Through November 13, JCP members can vote to fill the open seats on the SE/EE and ME executive committees. SE/EE nominees are Capgemini, Tom Crosman, Jean-Marie Dautelle, Doug Lea, Justen M. Stupka, Evan Summers, and Mauro Do Valle. The ME nominees are Jean-Marie Dautelle, Ericsson AB, and Sirf Technology Holdings, Inc.

The Compute Server project has released version 0.7. In this release, the team has implemented support for collecting and visualizing execution statistics as well as support for including Compute Server infrastructure code in debugging sessions. There have not been any changes made to the existing Compute Server APIs; Compute Server projects created with release 0.6 are compatible with the 0.7 release


Today's Weblogs starts off with some interesting hacks in

Mason's Blindingly Obscure Tips & Tricks, Vol. 1, in which Mason Glaves writes:
"Every so often, even after working with Java for 10 years, you will find yourself blundering into a blindingly obvious solution to a small problem that you never even remotely considered before. After I finished bonking myself on the head for never thinking of them before, I thought I would share what I have stumbled across in the last few weeks."

In
A new NetBeans Platform Sample: AudioStation, Rich Unger writes:
"Tim, Jarda and I taught a workshop on NetBeans plugin development at OOPSLA last week. As part of that course, I cooked up a new sample app to showcase the platform. It's a simple WAV file editor which showcases the use of the Lookup API to plug different visualizations of the WAV file."

Finally, writing from Prague, Joshua Marinacci has a
A quick intro to HttpClient:
"The following is a techtip I wrote which wasn't used. Since I turned out pretty well I thought I'd post it here. Let me know what you think. Would you like more of these small self-contained tips? "


In today's Forums,
brettneumeier expresses concern about the
Visibility of the open-source-Java process:
"I'm sure that Sun is making progress internally at open-sourcing the Java platform. However, I have not been able to observe any of this progress myself, as an open-source developer. My question is: is there any way that people like me can see what is actually happening in terms of releasing Sun's Java implementation as free or open-source software? I had thought that this forum would be the best venue for engaging directly with Sun on this topic, but it does not appear to me that very much is happening here. The last public statement that I have seen from Sun was on August 14. There haven't been any blog entries on the aggregated java.net blogs pertaining to open-source Java since Sept 27, and it and the two previous entries I saw were just discussing version control systems and bug-tracking systems to be used for open-source Java."

joshy explains the concept of Painters and their difference from look-and-feels in the thread
Re: Painters quick question:
"Essentially Painters bypass the look and feel. They are the equivalent of subclassing a component and overriding the paintComponent() method. However, Painters let you do this without subclassing, and you can do it quickly by using existing painters or building them with our gui tool. [...] Painters do not serve the same purpose as a L&F. If you want to affect every instance of a particular component in your application, (like all buttons), as part of a larger themeing effort then you should use a custom Look and Feel. However, if you want to change just a few components then you can use painters."


In today's java.net
News Headlines
:

Registered users can submit news items for the href="http://today.java.net/today/news/">java.net News Page using our
news submission
form
. All submissions go through an editorial review before being
posted to the site. You can also subscribe to the href="http://today.java.net/pub/q/news_rss?x-ver=1.0">java.net News RSS
feed.


Current and upcoming Java
Events
:

Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e">events submission form.
All submissions go through an editorial review before being posted to the
site.


Archives and Subscriptions: This blog is delivered weekdays as
the Java
Today RSS feed
. Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.

Sweep through XML at build-time