[SOLVED] HTML Tidy options, what happened to them?

Ask how to do things or if a certain feature is available in the program.
Post Reply
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

[SOLVED] HTML Tidy options, what happened to them?

Post by inspector71 »

Hello

Have the options to clean up / reformat / pretty print HTML, XML, been removed?

I cannot find them, which is not unusual, but I've tried several times. Still no luck.

Searched help and there's only a reference to the scripting method.

Weird.

I have a chunk of XML dumped from a web service that is extremely hard to read unless I can get it reformatted into a hierarchical / tree structure.

*sigh*
Last edited by inspector71 on 07 Nov 2021 10:56, edited 1 time in total.
User avatar
pjj
Posts: 2108
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: HTML Tidy options, what happened to them?

Post by pjj »

Do you perchance mean HTML > Offline validation?
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

[SOLVED] Re: HTML Tidy options, what happened to them?

Post by inspector71 »

Ah, that's the one, thanks.

I flicked over that and saw "Validate ..." without seeing the rest.
User avatar
pjj
Posts: 2108
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: HTML Tidy options, what happened to them?

Post by pjj »

It's easy to get lost in the labyrinth of RJ TE's menus... and it's easy to forget (I'm speaking about myself, lol) that we even have dedicated search for menu items :-D

(It's located in the right top corner, in the menu bar; default shortcut is Ctrl+H.)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

Re: HTML Tidy options, what happened to them?

Post by inspector71 »

pjj wrote: 07 Nov 2021 10:21 It's easy to get lost in the labyrinth of RJ TE's menus... and it's easy to forget (I'm speaking about myself, lol) that we even have dedicated search for menu items :-D

(It's located in the right top corner, in the menu bar; default shortcut is Ctrl+H.)
Oh, I just assumed that was searching something else.

The menus did seemingly get rearranged within the last couple of years. Several options pushed into groups, which I guess makes sense.

I guess that search would not necessarily have helped me either because I had the keyword "tidy" or "reformat" in my mind. Not really "Beautify" although maybe that would have popped into my head at some point. Maybe not!
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

Re: HTML Tidy options, what happened to them?

Post by inspector71 »

pjj wrote: 07 Nov 2021 10:21 It's easy to get lost in the labyrinth of RJ TE's menus...
This happened again. As I rarely debug XML (with nested HTML), the need to format it quickly, without even saving it, is not common so harder to remember something not done often. However ...

Whilst I completely acknowledge that creating consistent menu hierarchies and labels is a difficult task, in this case it seems counter-intuitive to have "Beautify XML" under a menu titled "HTML" ... as much as you, me and the gatepost know it's a 'front' for whatever functionality HTML Tidy can provide, hence easy to pop it under "HTML", it's confusing to have it there. Possibly more logical to have this under "Format"?

Speaking of formatting, today I lack the energy to format this post more helpfully. :(

Regardless, unfortunately and likely because fleabay's XML is not optimally formed, thus almost as useless as tits on a bull, Beautify XML does not work. In fact, it returns nothing but an empty new file, LOL. Kinda sucks to need a different text editor to do this task but I suppose RJ is doing the best he can which is all we can ask - and thank him - for.
User avatar
pjj
Posts: 2108
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: HTML Tidy options, what happened to them?

Post by pjj »

inspector71 wrote: 10 Jan 2022 03:03 Whilst I completely acknowledge that creating consistent menu hierarchies and labels is a difficult task, in this case it seems counter-intuitive to have "Beautify XML" under a menu titled "HTML" ... as much as you, me and the gatepost know it's a 'front' for whatever functionality HTML Tidy can provide, hence easy to pop it under "HTML", it's confusing to have it there. Possibly more logical to have this under "Format"?
Completely agree.
inspector71 wrote: 10 Jan 2022 03:03 Regardless, unfortunately and likely because fleabay's XML is not optimally formed, thus almost as useless as tits on a bull, Beautify XML does not work. In fact, it returns nothing but an empty new file, LOL. Kinda sucks to need a different text editor to do this task but I suppose RJ is doing the best he can which is all we can ask - and thank him - for.
FWIW, it works for me. What message did you get? Tidy outputs some text and then gives an exit code.

BTW, when I tidied up a XML file with "Beautify XML", output was captured in a new document (exit code: 0), with "Beautify HTML" and "Beautify xHTML" no new document was created (exit code: 2). Interestingly, in all three cases red square on original document's tab showed up, indicating that its newline format or encoding is different than established in project's config, even though they're not different -- and file was not altered in any way. BTW2, the new document had different newline format and encoding than the original XML file.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

Re: HTML Tidy options, what happened to them?

Post by inspector71 »

pjj wrote: 10 Jan 2022 19:11
inspector71 wrote: 10 Jan 2022 03:03 Whilst I completely acknowledge that creating consistent menu hierarchies and labels is a difficult task, in this case it seems counter-intuitive to have "Beautify XML" under a menu titled "HTML" ... as much as you, me and the gatepost know it's a 'front' for whatever functionality HTML Tidy can provide, hence easy to pop it under "HTML", it's confusing to have it there. Possibly more logical to have this under "Format"?
Completely agree.
inspector71 wrote: 10 Jan 2022 03:03 Regardless, unfortunately and likely because fleabay's XML is not optimally formed, thus almost as useless as tits on a bull, Beautify XML does not work. In fact, it returns nothing but an empty new file, LOL. Kinda sucks to need a different text editor to do this task but I suppose RJ is doing the best he can which is all we can ask - and thank him - for.
FWIW, it works for me. What message did you get? Tidy outputs some text and then gives an exit code.
Exit code: 2 IIRC.

Prior to that is the big request for multilingual help that blocks the exit code without scrolling, grrr.

Again, it could be nefarious XML from fleabay.

Just tried again and it works OK ... on a smaller subset of which I had painfully line-fed and tabbed into mostly-readable anyway :) Also ran Validate XML beforehand. Hmmmm.

Was your XML wrapping HTML in one of the tags?

Very generally speaking, I think HTML Tidy - the library I presume is behind the RJTE feature - is too prone to failure. If I can get it to make even two thirds of the text more readable, brilliant! Instead, if it crashes and fails to do anything, that's when it's useless. That is, wish it was more fault tolerant.
pjj wrote: 10 Jan 2022 19:11
inspector71 wrote: 10 Jan 2022 03:03 BTW, when I tidied up a XML file with "Beautify XML", output was captured in a new document (exit code: 0), with "Beautify HTML" and "Beautify xHTML" no new document was created (exit code: 2). Interestingly, in all three cases red square on original document's tab showed up, indicating that its newline format or encoding is different than established in project's config, even though they're not different -- and file was not altered in any way. BTW2, the new document had different newline format and encoding than the original XML file.
Interesting feedback.

I guess that's the trouble with submitting something like a sample of data, via pastebin for example. Sometimes line encodings and charsets might be different when someone troubleshooting this has a go.
Post Reply