I need to generate a node in a XML file with the following structure:
<node attribute0="value0" attribute1="value1" > </node>
How can I do it in StAX?
Edit 1: I'm trying the code from Section "3.4. Write XML File- Example" from Lars Vogel's tutorial (http://www.vogella.de/articles/JavaXML/article.html)
given the link you added it appears you use teh below syntax. have a look at his advanced tutorial for writting RSS feed here
StartElement rssStart = eventFactory.createStartElement("", "", "rss");
eventWriter.add(rssStart);
eventWriter.add(eventFactory.createAttribute("version", "2.0"));
eventWriter.add(end);