开发者

XML ignore attribute

I want to set [XmlIgnore] attribute on class because I want it to be sk开发者_运维知识库ipped in deserialization, but I want to keep its children to be deserialized.

is it possible to do so?

Thanks.


It makes no sense to want to deserialise children of an attribute you have not deserialised. There is nowhere for them to go - it's a bit like saying I want to create the properties of a class but not the class itself.

If you really wanted to do this I think you would have to write your own XML parser and then find somewhere to stick them - doesn't make sense to me.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜