SCdF wrote:OK, so I found
SublimeClang's code, might be a good starting point.
'Packages/HTML/html_completions.py' might provide an easier starting point.
The key method is 'on_query_completions' which should return a list of tuples. I'm guessing that this would completely replace any other available completions with the list that you return.
There's a library PyXML but, apparently, this is mostly now in the standard Python library (I'm sure you don't want to write your own XML parser

)
Again, I'm guessing, that you might use 'on_load' to then use file i/o to find, and parse, the attached schema file, creating a global list of tags that you might then refer to in your 'on_query_completions' event. I'm assuming that this list should persist between calls to your event(?). That is, you probably need/want to avoid re-parsing the schema file every time the completions list is required! Actually, using 'on_load' is probably not suitable - a keyboard shortcut should probably initiate your code.
If I were doing this I would probably concentrate, initially, on discovering and parsing the schema file, and deciding how/where to store the extracted tags and attributes. But maybe someone has already done this

. Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.