Ú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?:))
- AMD vs. INTEL vs. NVIDIA
- Kerékpárosok, bringások ide!
- Itt a Galaxy S26 széria: az Ultra fejlődött, a másik kettő alig
- Milyen alaplapot vegyek?
- Samsung Galaxy Felhasználók OFF topicja
- Bluetooth hangszórók
- Bestbuy játékok
- Battlefield 6
- iPhone topik
- Samsung Galaxy Z Fold5 - toldozás-foldozás
- További aktív témák...
- iPhone 14 Pro Max 256GB 100% (1év Garancia)
- Új bontatlan Google Pixel Watch 4 2év garancia!
- HP Probook 6530b,14",Intel Core P8700,4GB RAM,250GB HDD,WIN10
- Lenovo Thinpad üzleti kategóriás notebookok - i5 - i7 - Ryzen - nagy választékban számlával
- MSI GeForce RTX 5090 32G LIGHTNING Z /ÚJ, BONTATLAN, CSAK HÉTFŐIG/
- HIBÁTLAN iPhone 15 Pro 128GB Black Titanium-1 ÉV GARANCIA - Kártyafüggetlen, MS4653
- Apple iPhone 14 / 128GB / Kártyafüggetlen / 12HÓ Garancia / Akku: 85%
- Amazfit GTR Mini okosóra
- Honor 200 / 8/256GB / Kártyafüggetlen / 12Hó Garancia
- Sosemhasznált! HP OmniBook 5 Flip i5-1334U 16GB 512GB 14" áthajtós-érintős FHD+ Gar.: 1 év
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
