alek-sys / sublimetext_indentxml

Plugin for Sublime Text editor for reindenting XML and JSON files
MIT License
534 stars 136 forks source link

Add support or mode to allow undefined namespaces #105

Open aheiska opened 6 years ago

aheiska commented 6 years ago

I currently often find my self in situation where i have a part of larger xml-messages where namespace declarations are way higher in document. It would be helpful if I could take a child tag and format it.

Currently indenting following snippet fails:

<foo:task id="46ea7" active="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="foo:Task"><foo:source device="xyz" sourceId="xyxxy" /></foo:task>

Adding an xmlns:foo="aaa" to observed root of course makes it work, but this is manual work and has to be repeated for every namespace found in the snippet.