Hirdetés
- Yézi: Videokártyáim [2015/08-2026/01]
- Elektromos rásegítésű kerékpárok
- Luck Dragon: Asszociációs játék. :)
- BerserkGuts: 9800X3D Hitvallás, Dogma megcáfolása egy RTX5080+12600K-val
- GoodSpeed: Te hány éves vagy?
- Parci: Milyen mosógépet vegyek?
- ubyegon2: Airfryer XL XXL forrólevegős sütő gyakorlati tanácsok, ötletek, receptek
- GoodSpeed: Munkaügyi helyzet Hajdú-Biharban: észak és dél
- Magga: PLEX: multimédia az egész lakásban
- AMD K6 avagy hogy is volt 10 éve?!
Ú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
Hirdetés
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Apple iPhone 17 Pro 256GB Deep Blue- ÚJ, BONTATLAN, független, 1év garancia
- Asus GL553VD FY010T - Intel i7-7700, 16GB RAM, GTX1050 4GB, Samsung 970 NVME 250GB
- Logitech G SAITEK Farm Sim Controller
- Eladó Google Pixel 7pro 8/128. OLVASS
- Dell Precision 3591 FHD Touch / Ultra 7 155H 16C / 16-32G / 512G G4 / RTX Ada / AI IR FPR
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: Laptopszaki Kft.
Város: Budapest

