问题描述
当您制作XML Schema文件(.xsd)时,我真的很享受Intellisense与LINQ to XML的好处。我使用向导从现有文件创建模式。
但是,我从另一个XML文件创建了另一个模式(所以现在我的项目中有两个模式)但现在Intellisense显示来自BOTH模式的元素等。我可以区分它们,但想知道是否有办法将一个模式与特定的XDocument相关联。这是我在加载XDocument时可以添加的参数吗?
I've been really enjoying the benefits of Intellisense with LINQ to XML when you make an XML Schema file (.xsd). I used the wizard to make a schema from an existing file.
However, I created another schema from a different XML file (so now I have two schemas in my project) but now Intellisense shows elements etc. from BOTH schemas. I can distinguish between them but was wondering if there is a way to associate one schema with a particular XDocument. Is this a parameter I can add when loading an XDocument?
谢谢,
RK
推荐答案
我认为使用XML的命名空间(xmlns)可能很有用但我不知道知道怎么用来区分这个。
I think that could be useful use the Namespaces for XML (xmlns) but I don't know how to use to differenciate this.
我们对此很了解。
Francisco J。
Francisco J.
这篇关于不同XML文档的XML Schema的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!