Blog Archives
1 2

01: JAXB Tutorial for XML processing in Java step by step – unmarshall & marshall

Step 1: Create a Java Maven project.

Import the “simple-jaxb” folder that has the pom.xml it into eclipse as an “existing maven project”.

Step 2: Modify the “pom.xml” file to look like as shown below. The “maven-jaxb2-plugin” generates JAXB annotated Java objects from the XML schema “books.xsd”.

Read more ›



02: JAXB with StAX Tutorial step by step for unmarshalling

This tutorial extends JAXB Tutorial for XML processing in Java step by step – unmarshall & marshall

When to use JAXB with StAX?

When you want to process large XML files, reading the whole file into memory can cause “OutOfMemoryError” as discussed in Java String &

Read more ›



03: JAXB with StAX Tutorial step by step for marshalling

This tutorial extends JAXB Tutorial for XML processing in Java step by step – unmarshall & marshall When to use JAXB with StAX? When you want to process large XML files, reading the whole file into memory can cause “OutOfMemoryError” as discussed in Java String & … Read more ›...

Members Only Content
Log In Register Home


04: JAXB tutorial with XSD & binding.xjb

Step 1: Create a “simple-jaxb” project using Maven Step 2: Import the project into eclipse with File –> Import –> Existing Maven Projects and choose your folder you just created with pom.xml file “simple-jaxb”. Step 3: select “src/main/resources” right click and select Build Path –> … Read more ›...

Members Only Content
Log In Register Home


Java to marshal & unmarshal middle of an XML (i.e. a node inside XML) with JAXB

This means handle a middle of an XML document (i.e. a node in middle of an XML), and use JAXB to marshal & unmarshal. The two key words are “JAXBElement” and “javax.xml.stream.XMLStreamReader” to accomplish this as shown below. Marshal a Car object to XML fragment Assume that “Car” … Read...

Members Only Content
Log In Register Home


JAXB with Spring ORM for marshaling tutorial

This extends Basic JAXB tutorial with Maven & XSD – 1 to marshall with Spring OXM and Spring XML.

Right mouse click on target/generated-sources and select “Build Path –> Use as Source Folder

Step 1: add spring-orm to use JAXB and spring-xml to use StringResult.

Read more ›



JAXB with Spring ORM for unmarshaling tutorial

This extends Basic JAXB tutorial with Maven & XSD – 1 to unmarshal with Spring OXM and Spring XML.

The Spring & JAXB marshaling tutorial used XML based config to inject the “jaxb2Marshaller”, but in this to make things a bit more interesting, let’s use “Java”

Read more ›



1 2
Why & What are the benefits

🎯 Why java-success.com?

🎯 What are the benefits of Q&As approach?

Learn by categories such as FAQs – Core Java, Key Area – Low Latency, Core Java – Java 8, JEE – Microservices, Big Data – NoSQL, Architecture – Distributed, Big Data – Spark, etc. Some posts belong to multiple categories.

800+ Java & Big Data Q&As Menu

Top