public final String getMessage() {
JAXBContext jaxbContext;
StringWriter sw = new StringWriter();
try {
jaxbContext = JAXBContext.newInstance(Login.class);
Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
jaxbMarshaller.setProperty("jaxb.encoding", "ISO-8859-1");
jaxbMarshaller.marshal(this, sw);
} catch (JAXBException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return sw.toString();
}
यह स्टैंड कोड है जो मैं उपयोग कर रहा हूं..और मुझे आउटपुट मिल रहा है।jaxb जेनरेट xml
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
यहाँ मैं के रूप में
<?xml version="1.0" encoding="ISO-8859-1"?>
मैं कड़ी जाँच की स्टैंडअलोन दूर करने के लिए = "हाँ" और आउटपुट चाहते हैं JAXB - Remove 'standalone="yes"' from generated XML लेकिन यहाँ उत्तर हटा रहे हैं पूरा
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
हिस्सा
मुझे यह नहीं चाहिए ...
कृपया मेरी मदद करो ..
बहुत बहुत ब्लेज Doughan.It काम किया धन्यवाद !! – vg123