commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 梁昌宏 <>
Subject JavaBean xml conversion problems
Date Fri, 28 Jun 2013 01:03:09 GMT
Dear all:

    I found betwixt very interesting study for a day yesterday, but I encountered a problem
can not be solved, I hope you can give me suggestions,Questions are as follows;


public class Test {
 private String carNo;

 public Test(String carNo) {
  this.carNo = carNo;

 public String getCarNo() {
  return carNo;

 public void setCarNo(String carNo) {
  this.carNo = carNo;

 public Test() {

Test.betwixt template

<info primitiveTypes="element">
 <element name='Test'>
  <element property='carNo'></element>

If carNo is null, I want to generate the xml-stylesheet is
<carNo xsi:nil="true"></carNo>

Instead of

How to achieve the effect I want, please advice

深圳机场物流园发展有限公司 信息部 
地址:深圳宝安机场保税大厦413室 邮编:518128 
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message