Software Development

Modify XML Element Content in Java using XSLT

This post demonstrates how to modify some parts of the XML content in Java using XSLT. The example herein is rather straight-forward but will provide us a basic working codes before going further to learn the more advanced stuff.

Read More...

Java, Software Development

Java, XSLT, and XML with Namespaces

When a XML uses namespaces, they need to be declared and used in the .xsl file so that the javax.xml.transform.Transformer knows how to deal with various elements in the XML. This post demonstrates how to deal with namespaces when performing transformation from or on XMLs.

Read More...

Software Development

How to write XML in Kotin using DOM

This post demonstrates how to write XML files using DOM in Java.

Read More...

Software Development

How to read XML in Kotlin using DOM Parser

This post demonstrates how to read XML files using DOM Parser which parses and loads the entire XML into memory in a Tree structure which makes it very easy to traverse and manipulate elements.

Read More...

Software Development

JAXB – Perform Pre- and Post-processing with Unmarshaller.Listener

This post demonstrates how to perform pre- and post-processing with Unmarshaller.Listener. For instance you may want to compare the contents of an object before and after you unmarshal an XML. Another use-case is when you may need to store unmarshalled values to some list not mapped to any XML element. This is achieved by creating a class that extends Unmarshaller.Listener and overriding two (2) methods – beforeUnmarshal and afterUnmarshal.

Read More...

Software Development, Spring

Render XML using Thymeleaf

This post demonstrates how to render an XML to a file from a given XML template using Spring Boot and Thymeleaf.

Read More...

Software Development

Java – convert InputStream to InputStreamReader

This post demonstrates how to convert a file to InputStreamReader.

Read More...

Java, Software Development

Java – Convert JavaBean object to XML and back using XMLEncoder and XMLDecoder

The classes XMLEncoder and XMLDecoder allows you to convert JavaBean objects to XML and back, respectively. Note, that they are specifically designed for JavaBeans specification. Using objects whose classes do not

Read More...

Software Development

Java – Compare XML files using XMLUnit

Here, we’ll be using XMLUnit from www.xmlunit.org in a Maven project.

Read More...

Software Development

Web Service Using Apache XML-RPC

This articles demonstrates how to use Apache XML-RPC in Java command-line applications. We will create programs both for XML-RPC server and client.

Read More...