Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #20289
    BobBailey
    Participant

    I have an xml file that I want to edit a bit. Problem is that it comes up largely, actually completely, as one very long line. Since it was generated by another app I’m reluctant to reformat it for my purposes.
    Is it possible through a plug-in or some such to render this code as it appears in Firefox or IE? That is, indented and single lines per tag?
    This is probably a duh and I did search but all I found were fairly esoteric Q&A.
    TIA… Bob

    #20291
    Stefan
    Participant

    You can use any command line tool, like “HTML Tidy” (http://tidy.sourceforge.net/)
     
    How-to

    Download, unpack (I have a sub folder “Tools” in my EmEditor folder)

    and add a EmEditor Tool:

    ———————————————————————
    Tools > External Tools > Customize Tools > New
     
    Title: HTML Tidy -xml
    Command: .\Tools\HTMLTidy\tidy_(25mar2009)\tidy.exe
    Arguments: -xml -i -q “$(Path)”
     
    [X] Use Output Bar
    Input: Document
    Output: Replace Document
    OK
     
    OK
    ———————————————————————

    For example see for more:
    http://tidy.sourceforge.net/docs/tidy_man.html
    http://xmlwriter.net/user_tools/tidy.shtml 

    (Currently I don’t know how to just replace the document without opening the output bar ???)

     
    Open your file. run the new tool, close Output bar, done.

     
    HTH? ;D

    #20292
    BobBailey
    Participant

    Thanks. I found a macro that does it quite nicely: XMLFormatter.jsee
    …Bob

    #20658
    Scott Beeson
    Participant

    For anyone else who finds this, if you copy and paste Stefan’s settings be sure you replace the HTML quotes with normal quotes!

    #23955
    Mark Paulson
    Participant

    I’m a noob and can’t seem to get this to work. I could use some help getting tidy to work.

    Thanks

    #23956
    Yutaka Emura
    Keymaster

    As for HTML Tidy, there is a description with a screenshot at the bottom this page:

    https://www.emeditor.com/text-editor-features/extensibility/external-tools/

    Thanks,

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.