Using XML Schema for code autocomplete in my XML editor

前端 未结 5 1636
猫巷女王i
猫巷女王i 2021-01-12 03:22

I have XSD file (for example) http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd and I would like to use it for adding code autocomplete in my xml editor (I prefer Eclipse bu

5条回答
  •  说谎
    说谎 (楼主)
    2021-01-12 04:05

    In Visual Studio 2015 (and most likely earlier versions as well) just go to the Properties tab of the XML file in the solution and specify the path to the xsd in the Schemas attribute.

    I haven't spent much time on it, but looks like VS doesn't save the mapping in the csproj file, so the setting won't go in the version control, but if that's not something important for you, it's a quick and easy way to solve the problem.

提交回复
热议问题