2012-10-08 70 views

回答

2

以下是您如何映射到包含破折號-的XML屬性。

@XmlAttribute(name="some-name") 
public String getSomeName() { 
    return someName; 
} 

public void setSomeName(String someName) { 
    this.someName = someName; 
}