How to Speed Up Apache Xalan’s XPath Processor by Factor 10x

There has been a bit of an awkward bug in Apache Xalan for a while now, and that bug is XALANJ-2540. The effect of this bug is that an internal SPI configuration file is loaded by Xalan thousands of times per XPath expression evaluation, which can be measured easily as such: this: Element e = (Element) … Continue reading How to Speed Up Apache Xalan’s XPath Processor by Factor 10x

CSS selectors in Java

CSS selectors are a nice and intuitive alternative to XPath for DOM navigation. While XPath is more complete and has more functionality, CSS selectors were tailored for HTML DOM, where the document content is usually less structured than in XML. Here are some examples of CSS selector and equivalent XPath expressions: CSS: document > library > books > … Continue reading CSS selectors in Java

jOOX answers many Stack Overflow questions

When you search for Stack Overflow questions regarding XML, DOM, XPath, JAXB, etc, you could very often answer them simply with an example involving jOOX. Take this question extract for example: Goal My goal is to achieve following from this ex xml file : <root> <elemA>one</elemA> <elemA attribute1='first' attribute2='second'>two</elemA> <elemB>three</elemB> <elemA>four</elemA> <elemC> <elemB>five</elemB> </elemC> </root> … Continue reading jOOX answers many Stack Overflow questions