Take the 2-minute tour ×
Software Recommendations Stack Exchange is a question and answer site for people seeking specific software recommendations. It's 100% free, no registration required.

I've been looking around for how to do this automatically and I cannot quite figure it out

I am currently editing one of my skins I've released for LOTRO and some of the new code I have isn't formatted as my previous code. While I could simply do this all manually it would take hours.

            <Element ID="ListboxWidth"                                      X="9"       Y="48"      Width="182"     Height="5"> </Element>
    <Element ID="BackpackBackground"                                        X="1"       Y="1"       Width="1"       Height="1"> 
      <Element ID="Base_Box_Silver_Tooltip_TopRight"                        X="165"     Y="0"       Width="36"      Height="36"> </Element>
      <Element ID="Base_Box_Silver_Tooltip_TopLeft" X="0" Y="0" Width="36" Height="36"> </Element>
      <Element ID="Base_Box_Silver_Tooltip_TopMid" X="36" Y="0" Width="129" Height="36"> </Element>
      <Element ID="Base_Box_Silver_Tooltip_MidLeft" X="0" Y="36" Width="36" Height="28"> </Element>
      <Element ID="Base_Box_Silver_Tooltip_BottomLeft" X="0" Y="64" Width="36" Height="36"> </Element>
      <Element ID="Base_Box_Silver_Tooltip_BottomMid" X="36" Y="64" Width="129" Height="36"> </Element>

What I need is a way to make everything after the first 3 lines conform to the same standard as the rest of my code. I know there is a way to do this I just cannot figure it out.

share|improve this question
    
It looks like you have it in a non-standard format, copy-pasting into excel may be better if your intent is to align the X, Y, etc. instead of follow standard XML spacing –  user2813274 Aug 13 at 15:19

1 Answer 1

What you need(imho) is the pretty-format option for xml files.
This auto aligns your xml code, but firstly make sure the source file isn't malformed(missing tags, non-escaping characters etc...), so you will also need an XML validator for that.

Both options are covered by XMLTools.

So after you install it, Check XML syntax now to verify that your xml is valid and then Pretty Print (whichever you need)

enter image description here

share|improve this answer
    
that works, the only problem is it messes up my already preformatted work. I'm going to see how much it changes it though and give that a shot, Thank you! –  liftedplane Jun 21 at 2:43
    
Hmmm pretty print is a standard way to format an xml. If it only messes your preformatted it's ok imo, the whole result must satisfy you.Don't forget also to click the answer as "accepted" if it covered your needs. –  dimzak Jun 26 at 8:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.