手机版
热门标签
站点地图
我要投稿
广告合作
联系我们
搜 索
广告位招租
广告位招租
切换导航
首页
人工智能
编程教程
编程导航
编程百科
编程问答
编程博文
编程实例
硬件设备
网络运营
软件教程
移动数码
办公软件
操作系统
网络运维
技术频道
▸ 编程语言
▸ 前端开发
▸ 移动开发
▸ 开发工具
▸ 程序设计
▸ 行业应用
▸ CMS系统
▸ 服务器
▸ 数据库
公众号推荐
微信公众号搜
"智元新知"
关注
微信扫一扫可直接关注哦!
xml-serialization
xml-serialization专题提供xml-serialization的最新资讯内容,帮你更好的了解xml-serialization。
在C#webservice中使用NameValueCollection不会产生XML可序列化错误
当我尝试“添加Web引用”到我的ASMX代理项目时收到此错误消息: **"To be XML serializable, types which inherit from ICollection must have an implementation of Add(System.String) at all levels of their inheritance hierarchy. Sys
作者:佚名 时间:2019-09-23
如何将C#WCF DataContract序列化/反序列化到/从XML
我正在开发将被多个不同客户端应用程序使用的WCF服务.为了使一个功能起作用,服务器需要将 XML文件读入到C#DataContract中,然后传递给相关客户端.据MSDN网站了解,这是可能的,但我找不到任何完整的例子.特别是,该网站谈到一个“流”参数,我还没有得到. 我的数据合同有一个属性字段,它是具有多个简单属性字段的另一个数据契约的列表. 例如 [DataContract] publi
作者:佚名 时间:2019-04-25
什么是将Delphi对象树序列化到XML的好方法 – 使用RTTI而不是自定义代码?
什么是将Delphi对象树序列化到 XML的好方法 – 使用RTTI而不是自定义代码? 我本来希望发现这个功能已经在Delphi中构建了,但似乎并不是这样. 我发现了一些组件(发布在下面),看起来他们可能会执行这个功能.你有没有使用过任何一个或其他产品?你建立了自己的?我在Delphi中缺少一些明显的东西吗? 您可以使用JVCL TJvAppXMLFileStorage组件来序列化TPersist
作者:佚名 时间:2020-03-17
c# – 用于抑制空List的XmlSerialization的魔术名称
给定正确的“MagicName”(它类似于“CanSerialize”),以下代码将禁止空列表的xml. 这个神奇的名字是什么? public class MyClass { public List<int> MyList{ get; set; } public bool MyListMagicName() { return MyList.Count != 0; } pub
作者:佚名 时间:2019-04-24
c# – 没有xsi:type的派生对象的序列化
序列化包含派生对象列表的Dictionary时遇到问题.序列化输出包含 <BaseAttributes xsi:type="Turbine" Id="1975fe1f-7aa8-4f1d-b768-93ad262800cd"> 我希望BaseAttributes替换为Turbine,而xsi:type不存在. <Turbine Id="1975fe1f-7aa8-4f1d-b768-93ad262
作者:佚名 时间:2019-11-25
带有C#信封的对象的XML序列化
我需要在C#中将对象序列化为 XML.物体应包裹在信封中.为此,我创建了以下Envelope类: [XmlInclude(typeof(Person))] public class Envelope { public string SomeValue { get; set; } public object WrappedObject { get; set; } } 我使用以下代码序
作者:佚名 时间:2019-12-04
c# – Xml Serialize Descendants列表
我正在尝试序列化后代列表.这就是我现在所做的,效果很好: class Animal {} class Zebra:Animal{} class Hippo:Animal{} [XmlRootAttribute("Zoo")] class Zoo { [XmlArrayItem(typeof(Zebra))] [XmlArrayItem(typeof(Hippo))] p
作者:佚名 时间:2019-12-05
c# – RestSharp Deserialize返回空属性,但xml.deserialize测试有效
编辑:我问这个问题的那一刻我想尝试一下…… 我已经在请求上设置了XmlNamespace属性,并且这样做了. request.XmlNamespace = "http://musicbrainz.org/ns/mmd-2.0#"; 但我真的不明白为什么…… 下一个问题是让RestSharp将xml属性识别为对象属性 在周末的大部分时间里,我一直在讨论这个问题,而我却没有让它发挥作用. 我正在尝试围
作者:佚名 时间:2019-12-21
c# – 序列化包含List的列表
我试图序列化包含非系统类型的列表. 下面是我的序列化代码,它在顶层工作正常.并返回一个有效的XmlDocument,但似乎不包含内部列表中的任何内容. 我环顾网络 – 并且在SO附近 – 但似乎找不到任何东西! 任何帮助非常感谢. 码: public static XmlDocument SerializeToXML<T>(List<T> list, string rootElement) {
作者:佚名 时间:2019-12-26
c# – 将XML消息反序列化为对象
我正在编写一个使用HTTP传输 XML消息的协议的客户端.它是同步的,因为我形成一个遵循DTD的XML文档,并通过POST与WebClient类将其发送到协议的网关,我从远程服务器获得XML响应消息,以指示事务状态/消息ID /等. 既然我有DTD,是否可以用它创建类?对于我的XML消息正在执行的每种类型的“操作”,有一些可能的响应,并且具有可以由返回的服务器XML水合的类将是有利的. 有了这些类
作者:佚名 时间:2019-12-31
c# – XmlSerializer不使用sgen创建的XmlSerializers.dll
在我的Visual Studio 2010项目中,我使用以下Post-Build事件命令行来使用sgen来创建XmlSerializers.dll. 发布后事件: "$(ProgramFiles)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\sgen.exe" /a:"$(TargetPath)" /c:/keyfile:"c:\myproje
作者:佚名 时间:2020-01-03
c# – 数据协定序列化程序 – 如何省略集合的外部元素
如何使用Data Contract Serializer序列化没有外部元素的列表?我正在使用.Net 3.5.我有一个包含列表的类,除其他外,我希望序列化,而外部元素不符合相关的XSD: [DataContract(Name="MyClass")] public class MyClass { ... [DataMember(Name="Parameters")] public List<Para
作者:佚名 时间:2020-01-04
c# – XML文档中的错误(2,2)
我有一些xml文件,我试图在给定的代码中反序列化如下. using (StreamReader srFileContent = new StreamReader(filePath)) { XmlSerializer serializer = new XmlSerializer(typeof(messageType)); messageType objMessage = (
作者:佚名 时间:2020-01-10
使用C#.NET处理XML中的禁用字符
我有一个对象,我正在序列化为xml.看来其中一个属性中的值包含十六进制字符0x1E.我已经尝试将XmlWriterSettings的Encoding属性设置为“utf-16”和“unicode”但我仍然会抛出异常: 这是生成XML文档的错误. —> System.InvalidOperationException:生成XML文档时出错. —> System.ArgumentException:”,
作者:佚名 时间:2020-01-12
c# – XmlSerializer生成没有命名空间前缀的XML
我必须创建一个前缀为所有元素的 XML文件,如下所示: <ps:Request num="123" xmlns:ps="www.ladieda.com"> <ps:ClientId>5566</ps:ClientId> <ps:Request> 当我序列化我的对象时,c#很聪明并且这样做: <Request num="123" xmlns="www.ladieda.com"> <Cli
作者:佚名 时间:2020-01-24
c# – 序列化和恢复未知类
一个基础项目包含一个抽象的基类Foo.在单独的客户端项目中,有实现基类的类. 我想通过在基类上调用一些方法来序列化和还原一个具体类的实例: // In the base project: public abstract class Foo { abstract void Save (string path); abstract Foo Load (string path); } 可
作者:佚名 时间:2020-01-29
c# – XmlSerializer属性转换器
假设我们有一个可以被XmlSerializer序列化/反序列化的类.会是这样的: [XmlRoot("ObjectSummary")] public class Summary { public string Name {get;set;} public string IsValid {get;set;} } 我们有一个xml将是这样的: <ObjectSummary>
作者:佚名 时间:2020-01-29
c# – 我可以提供XmlSerializer的自定义序列化,而不实现IXmlSerializable?
我们使用XmlSerializer,我想为某些类提供自定义序列化.但是,我并不总是有能力修改该类的源代码,否则我可以使其实现IXmlSerializable.有没有办法做到这一点? 这是一个简单的代理反序列化助手的例子: 给定一个类型,我们不能直接控制在类级别的序列化: public sealed class Class //contrived example { public strin
作者:佚名 时间:2020-02-15
c# – 覆盖XmlSerialization的类名
我需要序列化IEnumerable.同时我想要根节点是“通道”和第二级节点 – Channel(而不是ChannelConfiguration). 这是我的串行器定义: _xmlSerializer = new XmlSerializer(typeof(List<ChannelConfiguration>), new XmlRootAttribute("Channels")); 我通过提供XmlR
作者:佚名 时间:2020-02-21
c# – 将memorystream对象序列化为字符串
现在我使用XmlTextWriter将一个MemoryStream对象转换成字符串.但是我不知道是否有更快的方法来将memorystream序列化为字符串. 我按照这里给出的代码序列化 – http://www.eggheadcafe.com/articles/system.xml.xmlserialization.asp 编辑 流到字符串 ms.Position = 0; using (Stre
作者:佚名 时间:2020-02-22
上一页
1
2
3
4
5
6
下一页
小编推荐
苹果市值2025年有望达4万亿美元
• 我国抢先量产三折叠屏的底气 揭秘背后产
• 19999元起首销秒罄!华为Mate XT三折叠
• iQOO Z9 Turbo+上手:性能猛兽+续航怪兽
• iPhone 16 系列成近年最不受欢迎一代
• 东北人放心买 Redmi Note Pro+支持零下
• 1399元起防水大满贯!Redmi Note 14 Pr
• 荣耀X60电池将突破6000mAh:国庆后发布
热门标签
更多
python
JavaScript
java
HTML
PHP
reactjs
C#
Android
CSS
Node.js
sql
r
python-3.x
MysqL
jQuery
c++
pandas
Flutter
angular
IOS
django
linux
swift
typescript
路由器
JSON
路由器设置
无线路由器
h3c
华三
华三路由器设置
华三路由器
电脑软件教程
arrays
docker
软件图文教程
C
vue.js
laravel
spring-boot