Earlier this week I ran into a missing feature in the Scala xml library and I ended up adding this feature myself, which turned out to be pretty simple.
I was trying to extract the text contents of an element in a piece of XML using the handy \ and \\ methods on scala.xml.NodeSeq. These methods allow you to extract sub-elements from an XML node in a way very similar to XPath, something like this:
val xml = <a><b><c>text</c></b></a> val c1 = xml \ "b" \ "c" val c2 = xml \\ "c" val text = c2.text
The problem I ran into occurred when I tried to use these methods to extract an element when one of its attributes had a certain value.
I was trying to learn Adobe AIR and was looking for some good set of learning resources. I found the book "Adobe AIR for Javascript Developers" from Oreilly by and started reading it online. A cool book, the authors have done great job on presenting the topics as an easilit readable pocket guide. Soon after reading this book, i felt i got the right resource i want for now.
(more...)
Filed under Ajax, CSS, Flex, Javascript, XML | No Comments »
A short overview on some of the XML rendering tools that i have experimented with.
While the applications of XML is a very broad topic, this blog will focus only on some of the tools available to use XML electronic forms creation, submission and exchange.
Example : An electronic purchase order or Invoice exchanged between two partners.
(more...)
Filed under Java, XML | 2 Comments »
And walks and talks like XML, it surely must be XML. Yes, well how wrong you can be about assumptions is once more shown in this blog.
One of our clients has an application through which videos are streamed. They do this by providing a browser embedded player, or your stand-alone Windows Media Player with an ASX file. The ASX file tends to look like this:
<asx Version="3"> <entry> <ref HREF="http://www.somecompany.com/videos/video.wmv"/> </entry> </asx>
Filed under XML | 3 Comments »
It's wednesday again! and that means a new Xebia Podcast!
This week we continue the Enterprise Java Application Performance Top 10, numbers 8 and 7 with Vincent Partington and Jeroen Borgers.
Number 8 - Incorrect usage of Java EE
More information about number 8 can be found here.
Number 7 - Unnecessary use of XML
More information about number 7 can be found here.
So download the podcast here or better yet! subscribe to one of our rss feeds on http://podcast.xebia.com
Filed under Java, Performance, Podcast, XML | No Comments »
Last week we discussed the incorrect usage of Java EE in the EJAPP Top 10 countdown. After that very broad topic, it's time for a very specific one on number 7.
The unnecessary use of XML is a boon to the performance of your Java EE application. XML has a number of interesting properties that cause it to be used for a whole range of functions in the average Enterprise Java application:
Someone once said that "XML is the noun and Java is the verb" and that has caught on. Unfortunately XML processing is heavy on CPU cycles and on memory usage.
Filed under Java, Performance, XML | No Comments »
In this post I'd like to point out some ideas regarding Binary XML and Excel.
The W3C's XML Binary Characterization Working Group started in the summer of 2003 and its first activity sparked protest from XML experts around the world. The Binary XML concept has been discussed before, exchanging ideas why a less verbose XML is necessary.
One year ago the XBC Working Group published their documents and continued their efforts at the Efficient XML Interchange Working Group, sadly without gaining too much interest. The problem is, Binary XML would be a whole new set of specifications, creating new problems: it would be humanly unreadable, new and updated tools, parsers and editors would be necessary, and a new set of agreements would have to be made for e.g. well-formedness validations.
Why do we invent a Binary XML when we already have a perfectly useable alternative: Microsoft Excel?
Excel is used for all kinds of purposes, even many it was not designed for: requirements, structured specifications, messages, issue tracking, timesheets, project management, timeseries data and -- of course, calculations. That makes Excel as much 'general purpose' as XML is.
What's more, it is already used by countless numbers of users worldwide. Nowadays non-Microsoft tools are able to take care of the Excel file format, so the usefulness of Excel spreadsheets is extended beyond the Microsoft Windows platform.
An Excel sheet is a binary format which simple human beings know how to deal with: we can open those spreadsheet files in our favourite office suite and look, analyse and modify what's in there. It's even more user-friendly than XML itself! No more tag balancing, no more character escaping! Spreadsheets lend themselves perfectly for mixed human-computer message exchange. For instance, a questionnaire or a timesheet could be provided as an Excel template, filled in by a user and processed by an administrative system, using the user's favourite Spreadsheet application and software like Jakarta POI.
It's a shame that most spreadsheets are only used by users, and almost never processed by software, which is a very real and practical option...
When will businesses go all the way and use spreadsheets to implement c2b or b2b messaging?
Filed under Java, XML | 8 Comments »