October 24, 2016
Hot Topics:

XML Manipulation with Apache AXIOM

  • January 30, 2009
  • By Deepal Jayasinghe
  • Send Email »
  • More Articles »

During the serialization, a directly created namespace from the factory will be added to the declarations only when that prefix is encountered by the serializer. You will learn how to serialize Axiom elements in the next article; however, if you serialize the element you created, you get the following output.

<ns:book xmlns:ns="axis2">

Sample 6: Working with Attributes

Now, see how to create and add attributes to the book element.

OMAttribute type =

If you serialize the element again, you will see the following output:

<ns:book xmlns:ns="axis2" type="web services">


In this article, I discussed a little bit of the history of Axiom and various ways of manipulating XML, especially the pull and push models. Then, I went though a few examples to give you an idea about Axiom XML APIs. In the next article, I will discuss more about XML navigation, Xpaths, and SOAP manipulation with Axiom.

About the Author

Deepal Jayasinghe is a Computer Science graduate student. Before starting his studies, he worked at WSO2 Inc. He is an Apache Member and active contributor to Apache Axis2 and other Apache Web services projects.

Page 3 of 3

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date
Rocket Fuel