Hirdetés
- Nothing Phone (3a) és (3a) Pro - az ügyes meg sasszemű
- Xiaomi 15 Ultra - kamera, telefon
- Xiaomi 15T - reakció nélkül nincs egyensúly
- Apple iPhone XR - amikor az olcsóbb is drága
- Pebble - az átgondolt okosóra
- MIUI / HyperOS topik
- Indiában Philips okostelefonokat is lehet majd választani
- Amazfit Bip 6 - jót olcsón
- Milyen okostelefont vegyek?
- Bemutatkozott a Poco X7 és X7 Pro
Új hozzászólás Aktív témák
-
artiny
őstag
orej.class ben a toXml metodus igy nez ki:
@SuppressWarnings("unchecked")
public String toXml() {
StringBuilder xml = new StringBuilder();
if ( this.emp!=null && !this.emp.isEmpty() ) {
for (Employee employee: this.emp) {
xml.append(employee.toXml());
}
}
return xml.toString();
}meg igy is jelzett a Employee.class ben a toXml nel a getBuffernál ,hogy:
StringBuffer sb = outWriter .getBuffer();
symbol: method getBuffer()
location: variable outWriter of type WriterTransformerFactory tf = TransformerFactory.newInstance();
Transformer t = tf.newTransformer();
DOMSource source = new DOMSource(doc);
StringWriter outWriter = new StringWriter();
//Writer outWriter = new StringWriter(); ha ezt a sort lecserltem ami most folotte van sor akkkor eltunt a hiba a getBuffer nál,de mikor lefutattom a programot nem hoz letre semmit..
a (new File("xmldoc.xml")) - valami hasonlo kene neki,hogy megadni hova mit mentsen .....
StreamResult result = new StreamResult( outWriter );
t.transform(source, result);
StringBuffer sb = outWriter .getBuffer();
return sb.toString();
} catch (Exception e) {
System.out.println(e.getMessage());
}
return null;
}
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- ÁRGARANCIA!Épített KomPhone i5 12400F 16/32/64GB RAM RX 9060 XT 8GB GAMER PC termékbeszámítással
- ÁRGARANCIA!Épített KomPhone i7 14700KF 32/64GB RAM RTX 5070 Ti 16GB GAMER PC termékbeszámítással
- Bomba ár! Lenovo ThinkPad L13 G3 - i5-1245U I 16GB I 256SSD I 13,3" FHD Touch I NBD Gari!
- LG L192WS monitor eladó: 19" 1440 900
- ÁRGARANCIA! Épített KomPhone Ultra 9 285K 64GB RAM RTX 5090 32GB GAMER PC termékbeszámítással
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


