Exemple #1
0
        /// <summary>
        /// Gets the namespace prefix that is associated with the
        /// specified file extension.
        /// </summary>
        public static string GetNamespacePrefix(string extension)
        {
            var association = XmlEditorOptions.GetSchemaAssociation(extension);

            if (association != null)
            {
                return(association.NamespacePrefix);
            }
            return(String.Empty);
        }
Exemple #2
0
        public static XmlSchemaCompletionData GetSchemaCompletionData(string fileExtension)
        {
            XmlSchemaCompletionData data = null;

            var association = XmlEditorOptions.GetSchemaAssociation(fileExtension);

            if (association != null)
            {
                if (association.NamespaceUri.Length > 0)
                {
                    data = SchemaCompletionDataItems [association.NamespaceUri];
                }
            }

            return(data);
        }