Created
December 3, 2023 01:16
-
-
Save vernetto/05c7d2e1a6f0614dbee077246fa7f7bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; | |
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; | |
@JacksonXmlRootElement(localName = "links") | |
public class Links { | |
@JacksonXmlElementWrapper(useWrapping = false) | |
private List<Link> link; | |
// getters and setters | |
} | |
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; | |
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; | |
public class Link { | |
private String name; | |
private String url; | |
private Property property; | |
// getters and setters | |
} | |
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; | |
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText; | |
public class Property { | |
@JacksonXmlProperty(localName = "property-ref") | |
private String propertyRef; | |
@JacksonXmlText | |
private String value; | |
// getters and setters | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment