加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – MSXML创建XML“标题”

发布时间:2020-12-16 01:42:17 所属栏目:百科 来源:网络整理
导读:我试图在VB6中使用MS XML来创建一个 XML文件,然后可以将其反序列化为C#中的对象. 我试图模仿的XML看起来像这样 ?xml version="1.0" encoding="utf-8"?ArrayOfStock xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/200
我试图在VB6中使用MS XML来创建一个 XML文件,然后可以将其反序列化为C#中的对象.

我试图模仿的XML看起来像这样

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfStock xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Stock>
    <ProductCode>12345</ProductCode>
    <ProductPrice>10.32</ProductPrice>
  </Stock>
  <Stock>
    <ProductCode>45632</ProductCode>
    <ProductPrice>5.43</ProductPrice>
  </Stock>
</ArrayOfStock>

我的问题是如何使用MSXML库创建以下行?

<?xml version="1.0" encoding="utf-8"?>

IE:如何创建未终止的“标题”值?

解决方法

看看这个 similar question.

You need to use a MXXMLWriter60,instead of saving it directly. … See 07001 for details.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读