Elliotte Rusty Harold’s new XML Object Model (XOM) is a simple, tree-basedAPI for XML, written in Java. XOM attempts to build on good ideas fromother Java XML APIs — SAX, DOM, and JDOM — and to leave behind some of theirfrustrations. The result is a high-level open-source API that is easy tolearn and use, assuming that you are already familiar with Java andXML.Unlike SAX, XOM is written with classes instead of interfaces, makingit more straightforward to use. With SAX you must first implementi Read the rest of this entry »
Getting Started with XOM
In previous articles, I have worked through the archives of the XML-SIG mailing list to gather some of the most useful bits of code and threads of discussion that are still relevant. The previous articles are “Gems From the Archives ” (published Apr. 9, 2003) and “More Gems From the Mines ” (published Nov. 12, 2003). In this article I continue where the last one left off, mining the XML-SIG archives for 2002 and 2003. As always, I have updated code where necessary to use current APIs, style, Read the rest of this entry »
You know the old saying, that a picture is worth a thousand words?There’s an awful lot of binary data out there, and XML is not going toreplace it all or even a significant percentage. After all, what’s thebenefit to xmlifying things like MPEG’s or program executables?Binary Data in XMLXML doesn’t handle embedded binary data very well. Naive developersfirst try to embed the data directly into their document, reasoning thatsince Unicode uses all possible byte values, they’ll be able to do this. Read the rest of this entry »
Putting RDF to Work
Over recent months, members of the www-rdf-interest mailing list have been working at creating practical applications of RDF technology. Notable among these efforts have been Dan Connolly’s work with using XSLT to generate RDF from web pages, and R.V. Guha’s lightweight RDF database project. RDF has always had the appeal of a Grand Unification Theory of the Internet, promising to create an information backbone into which many diverse information sources can be connected. With Read the rest of this entry »
Forming Opinions, Part 2
“But digital technologies enable a different kind of tinkering — with abstract ideas, though in concrete form.” — Lawrence Lessig, Free CulturePreviously, this column examined Web Forms 2.0, or WF2, a technical report recently presented to the W3C by Opera and the Mozilla Foundation. WF2 seeks to extend forms-related aspects of SGML-based HTML 4.01 and XHTML 1.x.Effectively extending an existing vocabulary is always a challenge; keeping track of which pieces are free to change ver Read the rest of this entry »
In last month’s “Transforming XML” column, we saw how to control thenamespaces that are declared and referenced in your resultdocument. If your stylesheet needs to know details about whichnamespaces are used in your source document, and to perform tasksbased on which namespaces certain elements or attributes belong to,XSLT offers a variety of ways to find out. This month we look atthem.To experiment, we’ll use the following document. It has onetitle element and one verse element from thehttp://w Read the rest of this entry »
Several years ago the only way to work with a web site was througha personal computer. There were different browsers, some of which weretext-based terminals and others that were GUI apps. Itwas assumed that the “normal” user had a machine with a large colordisplay with full graphic capabilities.But in the past three to four yearsthe numberof different kinds of devices that can access the Web has increasedsignificantly. And they have a wide variety of different capabilities:smart phon Read the rest of this entry »
One of the most annoying problems with XML (and SGML before it) isthe lack of editors/word processors supporting it. Sure, Emacs+PSGMLfits the bill, but would you let people familiar with traditionaloffice suites or word processors use it? The remaining options are afew pieces of Java software, Adobe’s FrameMaker+SGML (at $1499 apop), or the even pricier Adept from ArborText. In other words,unless you have a healthy budget or an inclination to fiddle withthings technical and complex, XML and its Read the rest of this entry »
The problem: The XML documents you have to parse are getting toolarge to load the entire document tree into memory; performance issuffering. The solution: use SAX.Understanding Event-Driven XML ProcessingSAX (Simple API for XML) is an event-driven model forprocessing XML. Most XML processing models (for example: DOM andXPath) build an internal, tree-shaped representation of the XMLdocument. The developer then uses that model’s API(getElementsByTagName in the case of the DOM orfindnodes using XP Read the rest of this entry »
All Roads Lead to RDF
August. Season of long, hot, lazy days, and not much else. While the vacation of all things XML continues, those eager RDF folks are still hard at work. Consequently, the XML-Deviant this week focuses largely on RDF-related topics. RDF: The Natural Conclusion of Web Services? For my main topic this week I am reaching again into the world of weblogs. Web services have never made for great mailing list discussions, but there are often quite thoughtful pieces to be found on the topi Read the rest of this entry »