Tip: Removing namespaces from XML elements using XMLBeans

I’m a big fan of Apache XMLBeans as it makes parsing, analysing and creating XML documents valid to XML Schemas incredibly easy. A really nice feature of XMLBeans is auto-typing. You can ask it to parse an arbitrary XML document and it will detect if the structure of the XML validates against a XML Schema that has been made known to it. If it does, then an appropriate subclass of the XMLBeans base class (XmlObject, similar in concept to java.lang.Object) is returned by the parser. The subclass allows you to traverse the document as if it is simply a collection of Java beans. Nice!
Continue reading

Advertisements

The fall and rise of XForms

Yesterday I gave a talk about the W3C XForms specification at the @Exeter_Web (http://www.exeter-web.org) web developer meetup. Unsurprisingly only 1 out of the 30 or so strong audience had heard of this specification and that’s why I called this talk “The fall and rise of XForms”. XForms really is one of the hidden gems of the web and there seems to be strong interest in learning more from many of those who attended. Hopefully we will have opportunity for more great conversations about this topic in the future and who knows, maybe next time you’ll be tell me about the great solutions you have been able to create using one of the many implementations of the specification. So if you found the talk interesting, why not leave me a comment below! The slides from the talk are available and linked from this post.