Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 14th, 2014, 05:46 PM
Authorized User
 
Join Date: Feb 2013
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default [JAXB] Possible to concate XmlElements into one

Hallo everyone,

by marshalling, is it possible to concate multiple XmlElements into only one XmlElement?

Code:
@XmlAccessorType(XmlAccessType.FIELD)
public class Customer {
    
    @XmlTransient
    private String start;
 
    @XmlTransient
    private String end;

    @XmlElement
    private String startend;

    private List<PhoneNumber> phoneNumbers;
 
}
I would like to get only this xml output:

Code:
<startend>111222</startend>
111 is the value from start
222 is the value from end

Is there any possible to concate them? Ist there any solution by using XmlAccessType.FIELD?

Thank you for your help.

Regards,
Ratna





Similar Threads
Thread Thread Starter Forum Replies Last Post
String Concate problem rmani XSLT 5 October 15th, 2012 02:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.