Hirdetés
Ú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?:))
- Samsung 75 QE75QN90A Neo QLED 4K UHD Smart TV Mini LED + Quantum Dot eladó
- ASUS ROG Zephyrus G16 (2024) RTX 4090 (!!) / Ultra 9 / GAR 2027 brutál erős, csúcs modell
- Cooler Master CK550 RGB mechanikus billentyűzet (Gateron Brown, HU)
- Elgato Stream Deck 15 gombos (MK.1) + állvány
- Gamer PC Ryzen 7 5800X + RTX 3060 12GB / 32GB RAM / vízhűtés / RGB
- Bomba ár! HP ZBook 15u G3 - i7-6G I 8GB I 256SSD I Radeon R7 I Cam I W11 I Garancia!
- Iphone SE 2020 64GB // ÁFÁS Számla // Garancia //
- eShark Karuta Gaming Egérpad - XL eladó 90cmx40cm
- Dell Latitude 5580,15.6",FHD,i5-6300U,8GB DDR4,256GB SSD,WIN11
- BESZÁMÍTÁS! ASUS B550M R7 5700X 16GB DDR4 512GB SSD RTX 3070 8GB Aerocool P500B Digi ARGB 750W
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

