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();
}
To jest kod, którego używam .. i otrzymuję dane wyjściowe w następujący sposób.Usuń standalone = "yes" z jaxb wygenerował xml
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
Tutaj chcę usunąć standalone = "yes" i chce wyjścia jak
<?xml version="1.0" encoding="ISO-8859-1"?>
sprawdziłem Link JAXB - Remove 'standalone="yes"' from generated XML ale odpowiedzi tutaj wyjmujesz kompletny
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
część
Nie chcę tego ...
Proszę mi pomóc ..
Dziękuję bardzo Blaise Doughan.It pracował !! – vg123