| Author |
Alternative to xStream
|
Anthony Campbell
Greenhorn
Joined: Aug 11, 2008
Posts: 14
|
|
Hi,
I'm trying to find an alternative to xStream. The use case is having the ability to serialise objects into a human readable form (most likely XML).
My company has been having some permission problems with xStream and has decided to drop the library. Any suggestions?
Thank you.
|
Kind regards,
Anthony
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32833
|
|
|
Not a "beginning" question. Moving thread.
|
 |
Anthony Campbell
Greenhorn
Joined: Aug 11, 2008
Posts: 14
|
|
|
I do apologise however, I've had some success using XMLEncoder if anyone is interested.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32833
|
|
You're not at fault, but apology accepted .
We do like to keep "beginning Java" for beginner's type questions. If the forum fills with harder questions, we are afraid it would scare possible users off.
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12956
|
|
There are a number of XML APIs in the standard Java library, and since Java 6 there's an XML streaming API - have a look at the documentation of package javax.xml.stream and JavaTM API for XML Processing (JAXP) from the JDK 6 documentation.
If you're not using Java 6, then there are other third-party libraries which implement the StAX API and that run on Java 5, see for example Woodstox. (On the other hand, if you're not using Java 6, having the streaming XML API in Java 6 could be an argument for you to convince your boss to upgrade to Java 6).
For background information see JSR 173: Streaming API for XML.
If you're looking for an easy way to convert XML to Java objects and vice versa, then have a look at Java Architecture for XML Binding (JAXB), which is also part of the standard Java API.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: Alternative to xStream
|
|
|