本文介绍了与c#中的xml相关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我有一些xml文件,里面包含很多不必要的信息。所以现在我需要从那个xml中提取所需的信息。我听说我们需要编写一些xsd并使用C#预定义类并使用trasform函数.... xsd和xsl之间有什么区别。是否xsd将通过写入xsl自动生成...我有任何想法。请给我建议程序。我很惊讶地提取并生成带有所需信息的xml。i had some xml file which contain lot of unnecessary information in it. so now i need to extract the required information from that xml. i heard that we need to write some xsd and use C# predefined class and use trasform function ....what is the difference between xsd and xsl . whether xsd will generate automatically by writting xsl... i dint had any idea.please suggest me the procedure . i am struck up in extracting and generating xml with required information.推荐答案 pasupulety写道:pasupulety wrote:difference between xsl and xsd?首先,最好先了解{0之间的区别之类的问题和{1}?在逻辑上是不正确的。苹果和苹果有什么区别?请看我过去的答案: 编程中的类和封装有什么区别 [ ^ ]。 另请参阅有关询问的讨论一个很好的问题: 如何提出一个好问题? [ ^ ]。 现在,您应该了解XSL在某些真正存在的XML文件上运行。它表示XML数据是一些其他形式,它可以通过数据丢失,复制等来实现。这只是一种转换数据的方法。基本上,它用于创建XML数据的不同表示,通常以人类可读的形式(例如HTML),但并非总是如此。请参阅: http://en.wikipedia.org/wiki/XSL [ ^ ]。 相比之下,XSD不需要对单个XML文件执行任何操作。它确实定义了一整类这样的文件,换句话说,就是一组约束;并且每个可能的XML可能符合也可能不符合它。它定义了定义兼容文件类的元数据。在某种程度上,它在媒体上定义了一些基于XML的语义语言。请参阅: http://en.wikipedia.org/wiki/XSD [ ^ ], http://en.wikipedia.org/wiki/Metadata [ ^ ]。 -SAFirst of all, it's best to understand that the questions like "what is the difference between {0} and {1}?" are logically incorrect. What is the difference between apple and Apple? Please see my past answer:what is the difference between the class and encapsulation in programming[^].See also this discussion on asking a good question:How to ask a good question?[^].Now, you should understand that XSL operated on some really existing XML files. It presents the XML data is some other form, and it can do it with data loss, duplication, etc. This is just a way to transform data. Basically, it is used to create a different representation of XML data, typically in a human-readable form (such as HTML), but not always. Please see:http://en.wikipedia.org/wiki/XSL[^].In contrast, XSD does not have to do anything with individual XML files. It really defined a whole class of such files, or, in other words, the set of constraints; and each of possible XMLs may or may not be compliant with it. It defined the metadata defining the class of compliant files. In a way, it defined some semantic language based on XML as on a media. Please see:http://en.wikipedia.org/wiki/XSD[^],http://en.wikipedia.org/wiki/Metadata[^].—SA 这篇关于与c#中的xml相关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-19 22:28