If the XML we edit has a schema, NetBeans will provide dynamic code completion. This is a very cool feature, because code completion is now available if the XML document has a schema attached. For example we create a Cocoon sitemap file in NetBeans and use the schema xsi:schemaLocation="http://apache.org/cocoon/sitemap/1.0 http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd"
. NetBeans will read in the schema file and provide code completion based on the schema. See the following screenshots of the code completion offered for the sitemap file:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGPDQIxBLj4ZVhjtppFEY4yr6gqag3HGw8uVWLHiIQkOC2UE10W0LjavLfSbFkWH5L2lu1ITpGtw3Gk4aZMl1CI0qcNJL6lcW9yqCg3pgYI6wIm96SfhK9XedqB25akjiDPcGowtD_8VSh/s320/netbeans-schema-cc1.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrsP9qnmdkFpZcv3HFrxgsIB-_6Pxc57UJa56rqFi7QtJm3SksevYFTtXwzyV38RvlfyQY1waatzbzLShImmQPnFTVbdeQDOPdVPe8dTBYj7Cq0qREPlJIIT-bLw_XsNL60N90jcf-b3j_/s320/netbeans-schema-cc2.png)