public XmlCompletionItemCollection GetNamespaceCompletion(string textUpToCursor) { string attrName = XmlParser.GetAttributeNameAtIndex(textUpToCursor, textUpToCursor.Length); if (attrName == "xmlns" || attrName.StartsWith("xmlns:")) { return(GetNamespaceCompletion()); } return(new XmlCompletionItemCollection()); }
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()); }
void FindSelectedAttribute(string xml, int index) { selectedAttribute = XmlParser.GetAttributeNameAtIndex(xml, index); }