使用.net中的XML文档类型定义 [英] Working with XML document type definitions in .net

查看:104
本文介绍了使用.net中的XML文档类型定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将XML DTD导入Visual Studio以生成代理类?

Is it possible to import an XML DTD into Visual Studio in order to generate a proxy class?

我有第三方.dll我需要与之交互它的设计类似于XML服务。进入.dll的接口全部由XML输入驱动,并以XML格式返回输出。关于它的好处是所有的输入和输出类型都很好地定义。坏消息是他们使用DTD(文档类型定义)。

I have a third party .dll that I need to interface with that is designed like an XML service. The interface into the .dll is all driven by XML inputs, and returns output as XML. The nice thing about it is that all the input and output types are well defined. The bad news is that they use DTD (Document Type Definition).

我真的不想手工构建XML,但我只知道如何使用XSD文件.Net

I would really like not to have to build up the XML by hand, but I only know how to use XSD files .Net

推荐答案

Visual Studio可以处理将DTD转换为XSD,此时您可以生成代理。

Visual Studio can handle converting your DTD to an XSD, at which point you could generate your proxy.

您应该只能将DTD加载到XML设计器中,选择Create Schema,然后让Visual Studio从中推断出XSD。

You should just be able to load your DTD into the XML designer, choose "Create Schema", and have Visual Studio infer the XSD from it.

这篇关于使用.net中的XML文档类型定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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