David Thielen
David Thielen

Reputation: 33006

Is there a Java equivalent of the C# XmlWriter?

I am looking for a simple lightweight way to write an XML file using Java. One that does not first build the output up in memory because some of the XML files we create are very large.

.NET has this with XmlWriter. Does Java have this anywhere?

Upvotes: 1

Views: 1022

Answers (2)

Hiệp Lê
Hiệp Lê

Reputation: 634

You can either use the native XMLStreamWriter or reference to this extended XMLWriter

Upvotes: 1

Ian Roberts
Ian Roberts

Reputation: 122414

The closest equivalent would be the XMLStreamWriter class in the StAX API.

Upvotes: 3

Related Questions