Creating and Consuming Atom Documents
Skip to end of metadata
Go to start of metadata

Creating and Consuming Atom Documents

The two most common uses for Abdera are creating and parsing Atom documents.

Minimal Required Maven dependency for both examples:

Parsing an Atom Document and printing entry titles

Example Code:

Creating an Atom Document and adding an entry

Example Code:

Instantiating Abdera

As you can see in both of these examples, the first step to using Abdera is to create an instance of the Abdera object. This special thread-safe class bootstraps the Abdera configuration and provides access to all of the other components. One of the most important tasks that the Abdera object performs is the automatic discovery of extensions.

Creating a new instance of the Abdera object can be time consuming so it is recommended that only a single instance be creating per application. The Abdera object and it's direct children (Parser, Factory, XPath, etc) are threadsafe and can be stored statically.

Creating a static instance of Abdera

Once an Abdera instance is created, you can begin parsing and creating Atom documents.

Labels
  • No labels