开发者

How to resolve local DTDs without System.Xml.Utils.Dll(XmlPreloadedResolver)?

I use an external DTD to validate my xml files. Sin开发者_JAVA技巧ce the XmlReader seem to look for the DTD only in the folder where the xml file is, I need to somehow tell the reader to look into a specific folder where my dtd's are.

I though of XmlPreloadedResolver to solve this but I cannot find System.Xml.Utils.Dll in the GAC. Isn't this a standard .NET framework assembly?

EDIT: It seems this DLL relies on silverlight to be installed. Is there another way to use a dtd for validation which is in another folder than the xml file itself?


According this article, System.Xml.Utils.dll is "optional and will be included in the package (XAP) based on the usage".

Seems this assembly is Silverlight related; on my machine, I just found it inside %ProgramFiles%\Microsoft SDKs\Silverlight\v?.0\Libraries\Client directories


System.Xml.Utils.dll is not part of the standard .NET Framework. It is included as part of the Silverlight SDK. If you haven't already installed it, you can do so from here: http://www.microsoft.com/downloads/details.aspx?FamilyID=1ea49236-0de7-41b1-81c8-a126ff39975b&displaylang=en

Once you have it installed, the assembly you want to reference in your project will be under %PROGRAMFILES%\Microsoft SDKs\Silverlight\v3.0\Libraries\Client\

This assembly includes the class System.Xml.Resolvers.XmlPreloadedResolver


.netfx 4.0 includes XmlPreloadedResolver in the System.Xml.dll. See http://msdn.microsoft.com/en-us/library/system.xml.resolvers.xmlpreloadedresolver.aspx for details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜