我想使用快速拉解析器来读取 XStream,但使用 Java 6 的默认拉解析器。(不是 DOM!)我该怎么办?
问问题
2438 次
3 回答
3
将适当的驱动程序传递给 XStream 构造函数:
XStream xs = new XStream(new StaxDriver());
String xml = xs.toXML(someObject);
于 2010-08-03T00:11:37.773 回答
0
Probably you want to reduce the dependencies to jar files but from my oservation the XppDriver
performs better than the StaxDriver
. So if you need higher parsing speed just go with the default. Maybe others made different observations.
于 2010-08-18T08:35:11.960 回答
0
xpp 驱动程序最后一次更新是在 2004 年
我宁愿使用 stax 或 dom 驱动程序
于 2011-03-08T19:23:39.493 回答