简体   繁体   English

.NET 的 XmlSerializer 的 Java 替代品是什么

[英]What is Java alternative for .NET's XmlSerializer

I'm porting c# application to Java and don't know what it is doing in details.我正在将 c# 应用程序移植到 Java 并且不知道它在详细做什么。 With what should I replace.Net's XmlSerializer in Java?我应该用什么替换 Java 中的.Net 的 XmlSerializer?

Thank you.谢谢你。

JAXB is your best bet and its also a Java standard. JAXB是您最好的选择,它也是 Java 标准。

Interesting posts: (Courtesy of Blaise Doughan )有趣的帖子:(Blaise Doughan提供)

XStream is a simple library to serialize objects to XML and back again. XStream是一个简单的库,用于将对象序列化为 XML 并再次返回。

In java you can use different technology to serialize/deserialize XML.在 java 中,您可以使用不同的技术来序列化/反序列化 XML。

From an XML schema:从 XML 架构:

With XPath:使用 XPath:

  • Use the class javax.xml.xpath.XPathFactory使用 class javax.xml.xpath.XPathFactory

Castor is another simple to use XML data-binding framework for Java. Castor是另一个简单易用的 XML 数据绑定框架,用于 Java。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用Java替代NSSortDescriptor是什么? - What's alternative NSSortDescriptor in Java? .NET等效或替代Java的GlyphVector? - .NET equivalent or alternative to Java's GlyphVector? Ploeh的AutoFixture for .Net是否有Java替代方案? - Is there a Java alternative to Ploeh's AutoFixture for .Net? Java NIO中BufferedWriter的替代方案是什么 - What's the alternative for BufferedWriter in Java NIO Java中通过接口覆盖的替代方法是什么? - What's the alternative in Java for overriding through an interface? Java的equalsIgnoreCase的正确替代是什么? - What is the correct alternative to Java's equalsIgnoreCase? C#XmlSerializer的XmlInclude在Java中等效 - C# XmlSerializer's XmlInclude equivalent in Java 什么是ASP.NET / PHP的主流Java替代品 - What is the main-stream Java alternative to ASP.NET / PHP Java:线程中的`while (true) { ... }` 循环不好吗? 什么是替代方案? - Java: Is `while (true) { ... }` loop in a thread bad? What's the alternative? 除了将Java中的SortedSet转换为Vector之外,还有什么更有效的选择? - What's a more efficient alternative than converting a SortedSet to a Vector in Java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM