(JAXB)
@XmlAttribute(required = true)
protected String id;
(SimpleXML)
@Attribute (required=true)
protected String id;
(JAXB)
protected ListtestValues;
(SimpleXML)
@ElementList (inline=true,required=false)
protected ListtestValues;
<data>
<test class="java.util.ArrayList">
<test id=“hoge” value=“hoge”/>
<test id=“”hoge2 value=“”hoge2/>
</test>
</data>
<test class="java.util.ArrayList”></test>とくっついてきちゃいます。
<data>
<test id=“hoge” value=“hoge”/>
<test id=“”hoge2 value=“”hoge2/>
</data>
public String dataToXml(Data data){
StringWriter writer= new StringWriter();
Serializer serializer = new Persister();
try {
serializer.write(data, writer);
} catch (Exception e) {
e.printStackTrace();
}
return writer.toString();
}
org.jivesoftware.smackx.ConfigureProviderManager.configureProviderManager();
config.setTruststoreType("BKS");
config.setTruststorePath("/system/etc/security/cacerts.bks”);
ProviderManager pm = ProviderManager.getInstance();
pm.addIQProvider("pubsub","http://jabber.org/protocol/pubsub", new org.jivesoftware.smackx.pubsub.provider.PubSubProvider());
…
if (parser.getEventType() == XmlPullParser.START_TAG) {