Home Download Buy Blog Forum Support

Indent XML

Indent XML

Postby alek.sys on Fri Sep 30, 2011 8:23 pm

Hi all,
today made small but useful plugin which allow turn
Code: Select all
<?xml version="1.0" encoding="UTF-8"?><root><node1>data here</node1><node2 attr="222"><node3/></node2></root>

to formatted XML
Code: Select all
<?xml version="1.0" ?>
<root>
   <node1>
      data here
   </node1>
   <node2 attr="222">
      <node3/>
   </node2>
</root>


You could get it here: https://github.com/alek-sys/sublimetext_indentxml
Any comments are welcome!
P.S. Hope that this is not a one of the standard features which I just don't know about :)
alek.sys
 
Posts: 3
Joined: Fri Sep 30, 2011 8:17 pm

Re: Indent XML

Postby jchannon on Wed Oct 05, 2011 6:02 pm

Thanks! Works a treat!
jchannon
 
Posts: 15
Joined: Sun Oct 02, 2011 4:09 pm

Re: Indent XML

Postby PHANT0M on Sat Oct 08, 2011 7:19 am

Doesn't work with Cyrillic characters in text. File encoding is UTF-8 without BOM.
PHANT0M
 
Posts: 7
Joined: Sat Oct 08, 2011 7:16 am

Re: Indent XML

Postby alek.sys on Thu Oct 20, 2011 8:31 am

PHANT0M wrote:Doesn't work with Cyrillic characters in text. File encoding is UTF-8 without BOM.


Fixed, check https://github.com/alek-sys/sublimetext_indentxml for update
alek.sys
 
Posts: 3
Joined: Fri Sep 30, 2011 8:17 pm

Re: Indent XML

Postby alek.sys on Sun Nov 06, 2011 2:54 pm

Good news, everyone!
"Indent XML" was added to Package Control (http://wbond.net/sublime_packages/package_control) default repository.
So to install Indent XML just run "Package control: Install package" (of course, having Package Control already installed) command in Sublime Text.
alek.sys
 
Posts: 3
Joined: Fri Sep 30, 2011 8:17 pm

Re: Indent XML

Postby geertp on Tue Nov 15, 2011 11:10 am

I am trying to get this plug-in to work on my Mac, but unsuccessful so far. I installed it using the Package Control, which lists the plug-in as installed, but I don't know how to run it... :) Anyone succeeded in installing this on a Mac?
geertp
 
Posts: 1
Joined: Tue Nov 15, 2011 11:06 am

Re: Indent XML

Postby fanchok on Tue Nov 15, 2011 10:51 pm

Same here, I could not make it work on mac os x :-(
fanchok
 
Posts: 1
Joined: Tue Nov 15, 2011 10:49 pm

Re: Indent XML

Postby leecade on Thu Nov 17, 2011 3:22 am

Great!

hoping it can Indent HTML
leecade
 
Posts: 14
Joined: Thu Nov 10, 2011 10:26 pm

Re: Indent XML

Postby alek_sys on Thu Nov 17, 2011 3:26 pm

fanchok wrote:Same here, I could not make it work on mac os x :-(

geertp wrote:I am trying to get this plug-in to work on my Mac, but unsuccessful so far. I installed it using the Package Control, which lists the plug-in as installed, but I don't know how to run it... :) Anyone succeeded in installing this on a Mac?


Hi all,
everyone having problem with Indent XML are welcome to help resolve it here https://github.com/alek-sys/sublimetext ... l/issues/1
I'm looking for Mac now :) (already about to buy it ;) ), hope to get it fixed asap.

Alex.
alek_sys
 
Posts: 7
Joined: Thu Nov 17, 2011 3:22 pm

Re: Indent XML

Postby alek_sys on Thu Nov 17, 2011 3:28 pm

leecade wrote:Great!
hoping it can Indent HTML


Not quite sure, because it uses the xml.minidom parser and not every HTML is valid XML. I will think is it possible to use TidyHTML or any 3rd party tools.

Alex.
alek_sys
 
Posts: 7
Joined: Thu Nov 17, 2011 3:22 pm

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: Google [Bot] and 4 guests