开发者

Can anyone recommend a .Net XML Serialization library? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 12 months ago.

Improve this question

Can anyone recommend a .Net XML Serialization library (ideally open source).

I am looking for a robust XML serialization library that I can throw any object at, which will produce a human readable XML representation of the public prope开发者_如何学编程rties for logging purposes.

  • I never need to be able to deserialize.
  • XmlSerializer's requirement of an object having a parameter constructor is too restrictive for what I want.
  • DataContractSerializer does not give enough control over the output (which is not particularly human-readable).

Any recommendations appreciated!

Thanks


2 that come to mind right away:

http://xsd2code.codeplex.com/

http://www.codeproject.com/KB/XML/yaxlib.aspx


It turned out that YaxLib has some of the same issue I was having with the XMLSerializer (it needs a parameterless constructor, and I had some issues with stack-overflow exceptions due to recursion).

In the end I went with json serialization using a library called json.net. I have been seriously impressed with this, and so far is has seemed way way more robust than any xml library i have tried, and very flexible too. The code is open source, and very impressive too. Kudos James Newton-King (the guy who wrote it). http://james.newtonking.com/projects/json-net.aspx


You could transform the XML using XLST.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜