Free, independent guides since 2010

Code

How to start using dom4j

A video tutorial on getting started with dom4j: adding it to a Java project, creating a document, adding elements and pretty-printing XML.

<page section="Code" type="guide" read="1 min"/>

dom4j is an open-source Java library for working with XML. If you have never used it, a video is a friendly way to see it in action before you dive into the details. Below is a short tutorial with time stamps, followed by links to our own written guides.

The video is a little bit of a mediocre quality; but the author makes a great and simple tutorial to get you started with Dom4J!

  • 00:20 How to download and start using dom4j?
  • 00:50 How to use dom4j in a java project?
  • 01:40 How to use dom4j to generate xml?
  • 03:00 How to add elements using dom4j?
  • 04:10 How to use dom4j to create a document?
  • 04:30 How to add text to an element in dom4j?
  • 05:30 How to format xml when using dom4j?

Continue with our written guides

The video shows the basics. Our step-by-step guides go further, with code you can copy: