不同XML文档的XML Schema [英] XML Schema for different XML docs

查看:90
本文介绍了不同XML文档的XML Schema的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您制作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

推荐答案

我在这个主题上也非常有趣。

I'm very interesting in this subject too.

我认为使用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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆