What is the correct way to define a schema for CustomDictionary in Visual Studio (2013)?

I use a custom dictionary (CustomDictionary.xml) to parse the code, and it works as it should, but I continue to receive warnings that tell me that the XML file does not determine its xsd schema location properly.

CustomDictionary.xml warnings

I found xsd on my machine and urinated it as a file link:

file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2012.0/Team%20Tools/Static%20Analysis%20Tools/Schemas/CustomDictionary.xsd 

This link in Chrome opens perfectly .xsd.

How to refer to it correctly, then inside CustomDictionary.xml?

What I have found so far indicates the following, but it is not:

 <Dictionary xmlns="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/ file:/.../CustomDictionary.xsd"> 

(I simplified the file path for clarity)

Any suggestions on what I'm doing wrong?

Thanks in advance, --Eric

+5
source share
1 answer

Add CustomDictionary.xsd to your project and to your XML file, change the attribute of the Dictionary element as the line below

 <Dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CustomDictionary.xsd"> 
+5
source

Source: https://habr.com/ru/post/1205801/


All Articles