コード例 #1
0
        public XmlCompletionItemCollection GetNamespaceCompletion(string textUpToCursor)
        {
            string attrName = XmlParser.GetAttributeNameAtIndex(textUpToCursor, textUpToCursor.Length);

            if (attrName == "xmlns" || attrName.StartsWith("xmlns:"))
            {
                return(GetNamespaceCompletion());
            }
            return(new XmlCompletionItemCollection());
        }
コード例 #2
0
 public XmlCompletionItemCollection GetAttributeValueCompletion(string text, int offset, XmlSchemaCompletion defaultSchema)
 {
     if (XmlParser.IsInsideAttributeValue(text, offset))
     {
         XmlElementPath path          = XmlParser.GetActiveElementStartPath(text, offset);
         string         attributeName = XmlParser.GetAttributeNameAtIndex(text, offset);
         return(GetAttributeValueCompletion(path, attributeName, defaultSchema));
     }
     return(new XmlCompletionItemCollection());
 }
コード例 #3
0
 void FindSelectedAttribute(string xml, int index)
 {
     selectedAttribute = XmlParser.GetAttributeNameAtIndex(xml, index);
 }