Posted 13 years ago by NorthGates - NorthGates Systems
Version: 4.0.0287
Avatar
How can I prevent the xmlns from being automatically added when I add a tag? I already have the xmlns added at the root node in the document and in code in schemaresolver.

Comments (2)

Posted 13 years ago by NorthGates - NorthGates Systems
Avatar
Ok, just had to think a bit, here it is:

 protected override void OnSyntaxEditorIntelliPromptMemberListClosing(SyntaxEditor syntaxEditor, System.ComponentModel.CancelEventArgs e)
        {
            if (!e.Cancel)
            {
                IntelliPromptMemberListItem li = syntaxEditor.IntelliPrompt.MemberList.SelectedItem;
                if (li != null && li.AutoCompletePreText != li.Text && !(li.Tag is System.Xml.Schema.XmlSchemaAttribute))
                    li.AutoCompletePreText = li.Text;
            }
            base.OnSyntaxEditorIntelliPromptMemberListClosing(syntaxEditor, e);
[Modified at 08/05/2011 11:27 PM]
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The only time an xmlns gets added is if you are entering a new element that isn't in the current XML namespace. You could set the XmlSchemaResolver.DefaultNamespace property to set a document-level namespace if you don't want the first element in the document to get the xmlns added when the element is added.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.