Using XML Schema for code autocomplete in my XML editor

前端 未结 5 1639
猫巷女王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:09

    xsi:schemaLocation

    It is supported by default in Eclipse. You just need to add XSI and schemaLocation as the following example.

    
    
    

    As you can see above, you have need 3 attributes. The autocomplete works because of the valid xsd hosted on a public url and provided in the xsi:schemaLocation attribute

    Note that all Editors don't support this by default, but Eclipse and Netbeans I know do.

    Reference: https://metamug.com/article/auto-complete-xml-editor-with-xsd-and-validations.php

    Metamug Autocomplete XSD Validation

提交回复
热议问题