Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julian-eggers/spring-xom-marshaller
Spring XML Marshalling with XOM
https://github.com/julian-eggers/spring-xom-marshaller
java spring spring-boot xml xom xpath
Last synced: 20 days ago
JSON representation
Spring XML Marshalling with XOM
- Host: GitHub
- URL: https://github.com/julian-eggers/spring-xom-marshaller
- Owner: julian-eggers
- License: mit
- Created: 2016-07-05T19:43:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-07-23T04:15:07.000Z (over 3 years ago)
- Last Synced: 2024-10-27T20:58:15.745Z (2 months ago)
- Topics: java, spring, spring-boot, xml, xom, xpath
- Language: Java
- Homepage:
- Size: 57.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spring-xom-marshaller
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.itelg.spring/spring-xom-marshaller/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.itelg.spring/spring-xom-marshaller)
[![Build](https://github.com/julian-eggers/spring-xom-marshaller/workflows/release/badge.svg)](https://github.com/julian-eggers/spring-xom-marshaller/actions)
[![Nightly build](https://github.com/julian-eggers/spring-xom-marshaller/workflows/nightly/badge.svg)](https://github.com/julian-eggers/spring-xom-marshaller/actions)Spring XML Marshalling with [XOM](http://www.xom.nu/)
#### Maven
```xmlcom.itelg.spring
spring-xom-marshaller
1.3.0```
#### Examples
##### Enable auto-configuration via annotation
[@Autowire](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/beans/factory/annotation/Autowire.html) XomMarshaller for further use in [MarshallingHttpMessageConverter](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.html) or [MarshallingMessageConverter](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/messaging/converter/MarshallingMessageConverter.html).
```java
@SpringBootApplication
@EnableXomMarshaller
public class Application
{
@Autowired
private XomMarshaller xomMarshaller;
public static void main(String[] args) throws Exception
{
SpringApplication.run(Application.class, args);
}
}
```##### Example-Writer
```java
@Component
public class IntegerWriter extends AbstractWriter
{
@Override
protected Element doWrite(Integer integer)
{
Element rootElement = new Element("integer");
Element valueElement = new Element("value");
valueElement.appendChild(integer.toString());
rootElement.appendChild(valueElement);return rootElement;
}
}
```## Build & Release
### Build
```
mvn clean package
```### Release
```
mvn clean deploy
```