Popularity
2.5
Declining
Activity
2.1
-
74
4
12

Programming language: Java
License: Apache License 2.0
Tags: Miscellaneous    
Latest version: v1.4.17

XMLBeam alternatives and similar libraries

Based on the "Miscellaneous" category.
Alternatively, view XMLBeam alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of XMLBeam or a related project?

Add another 'Miscellaneous' Library

README

XMLBeam

This is a Java XML library with an extraordinary expressive API. By using XPath for read and write operations, many operations take only one line of Java code.
This is how it looks:

<xml>
   <example>
      <content type="foo" >bar</content>
   </example>
</xml>

Access XML content in an object oriented way:

public interface Example {

    // This is a getter for the attribute "type"
    @XBRead("/xml/example/content/@type")
    String getType();

    // This is a getter and a setter for the value of the element "content"
    @XBAuto("/xml/example/content")
    XBAutoValue<String> content();
}

Example example = new XBProjector().io().file("example.xml").read(Example.class);
String type = example.getType(); // "foo"
String content = example.content().get(); // "bar"
example.content().set("new value");

Or, direct access via XPath enabled collection types:

Map<String,String> map = new XBProjector().io().file("example.xml").readAsMapOf(String.class);
String type = map.get("/xml/example/content/@type");
String content = map.get("/xml/example/content");
map.put("/xml/example/content","new value");

Learn more on xmlbeam.org