xml

A collection of 7 posts

A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
Nov 9, 2025 xml xsd validation xerces

XML Schema Validation 1.1 in Java

This week, I received an interesting task: dusting off a legacy Java application. The application analyzes specific XML files in proprietary format. I know XML doesn’t sound sexy to junior developers, but it has an amazing benefit. One can validate a file against a grammar. Such grammar is called an XSD, the acronym for XML Schema Definition. Fun fact: you write XSDs in XML. In this post, I explain the problem, what I tried, and the final working solution.

Nicolas Fränkel
Sep 27, 2020 xml json yaml configuration data exchange

In defense of XML

When I started my career, XML was ubiquitous. The meta-information in a Java JAR file - the manifest - follows a proprietary format. But Java EE designers built it from the ground up on XML: meta-information of all artifacts is in XML format e.g. web.xml, ejb-jar.xml, application.xml, etc. Java EE is one example I experienced personally. But XML was everywhere in the enterprise world at the time. Its prevalence manifested itself in two areas: configuration and data transfer.

Nicolas Fränkel
Sep 10, 2017 spring configuration groovy kotlin xml annotations

Flavors of Spring application context configuration

Every now and then, there’s an angry post or comment bitching about how the Spring framework is full of XML, how terrible and verbose it is, and how the author would never use it because of that. Of course, that is completely crap. First, when Spring was created, XML was pretty hot. J2EE deployment descriptors (yes, that was the name at the time) was XML-based. Anyway, it’s 2017 folks, and there are multiple ways to skin a cat.

Nicolas Fränkel
Sep 30, 2012 xml

Use local resources when validating XML

Depending of you enterprise security policy, some - if not most of your middleware servers have no access to Internet. It’s even worse when your development infrastructure is isolated from the Internet (such as banks or security companies). In this case, validating your XML against schemas becomes a real nightmare. Of course, you could set the XML schema location to a location on your hard drive. But about about your co-workers then?

Nicolas Fränkel
Sep 2, 2012 validation xml

XML validation with imported/included schemas

Recently, I tried to help a teammate design a WSDL file. I gently drove him toward separating the interface itself in the WSDL file and domain objects in a XML Schema file. One thing leading to another, I also made him split this XSD into two separate files, one including another for design purposes. Alas, tests were already present, and they failed miserably after my refactoring, complaining about a type in the included file not being found.

Nicolas Fränkel
Dec 29, 2009 authoring beans custom handler parser schema spring tag validation xml

Discover Spring authoring

In this article, I will describe a useful but much underused feature of Spring, the definition of custom tags in the Spring beans definition files.

Nicolas Fränkel
Jun 17, 2009 binding bindings custom customization customize jaxb maven plugin parent class serializable xjc xml

Customize your JAXB bindings

JAXB is a bridge between the Java and the XML worlds, enabling your code to transparently marshalls and unmarshalls your Java objects to and from XML. In order to do this, you should have a class representing your XML-Schema. This class is created by the xjc. In most cases, xjc creates a class that won’t suit your needs. In this article, we’ll see why it does so and what we can do to customize this behaviour.

Nicolas Fränkel
A Java geek © 2008-2026
v. bc04c88300c3ec997ce8470fbff5395dc9e518b1/13264050981
Latest Posts