如何在C#中从XML读取键值 [英] How to read key value from XML in C#
本文介绍了如何在C#中从XML读取键值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好朋友,
我是xml的新手。我想在我的c#应用程序的.xml文件中指定持续时间。
这是我的代码。我不知道。它是否正确。
hello friends,
I am new to xml. I want to specify the time duration in .xml file for my c# application.
This is my code. I don't know. is it correct or not.
<?xml version="1.0" encoding="utf-8" ?>
<setting>
<xs:element xmlns:xs="http://tempuri.org/XMLFile1.xsd">
<xs:element name="period" type="xs:duration">
<period>PT10S</period>
</xs:element>
</xs:element>
</setting>
如果我错了请纠正我。
Please correct me if i am wrong.
推荐答案
阅读本教程..
1) XSD概述
2) XSD日期和时间数据类型
如果您的问题是创建一个新的xml文件,那么看看这个链接
C Sharp Informations
或
Stack Overflow
或
Mind Fire Solutions
如果你正在寻找如何阅读xml文件,那么看一下下面链接
C Sharp信息阅读
一个简单的谷歌搜索给了我以下很多链接
一个简单的谷歌搜索
看看,如果你正在寻找除上述之外的其他解决方案,链接然后更好地表达您的问题或发表评论。
If your question is to create a new xml file then have a look at this link
C Sharp Informations
or
Stack Overflow
or
Mind Fire Solutions
if you are looking for how to read xml file then have a look at the below links
C Sharp Informations To Read
A simple google search gives me these many below links
A simple google search
Have a look at that, and if you are looking for some other solution other than the above mentioned, links then better phrase your question or post comments.
这篇关于如何在C#中从XML读取键值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文