vbr: -------------------------------------------------------------------------------- Hi, I'd like to add some clearer specification to the code posted above: http://forum.pspad.com/read.php?2,66273#msg-66284
It changes the whole content of the editor window with the sorted text - it is probably ok for the given sample text which only contains the XML elements, that should be sorted; however, it is likely, that a whole XML file will be loaded, with other elements, or at least with the toplevel element etc., where sorting would be harmful.-------------------------------------------------------------------------------- Yes, sorting the whole file would be harmful. vbr: -------------------------------------------------------------------------------- It might be appropriate to work with the selected text only. ... Of course, there can be variants to check for a possibly present selection and handle it conditionally - depending on the requirements. hth, vbr-------------------------------------------------------------------------------- Thank you very much once more, I think this modification "kills" the remaining problem :) I owe you one or two! It would have taken me several days (maybe weeks) to get to this point. Thank you very much for all this :) I will make some tests later on. Later, Dirk -- <http://forum.pspad.com/read.php?2,66273,66292> PSPad freeware editor http://www.pspad.com
