Re: RFE Find/Replace elements
Hussein Shafie <[email protected]> Mon, 1 Aug 2022 11:16:51 +0200
| Newsgroups | gmane.editors.xxe.general |
|---|---|
| Message-ID | <[email protected]> |
On 7/31/22 16:23, Leif H Silli wrote: > This is a question and a wish: Would it be possible to enhance the > Find/Replace Elements function with the ability to not just find an > element, in order to change it into another element, but also to delete > found elements (the same way that it is possible to delete found > attributes)? We have nothing against enhancing the the Find/Replace Element function. However we cannot tell you which enhancements we'll implement and when we'll do it. > > There are certain strange things with the Find/Replace Elements > function. For instance, I have some XHTML docs with this construct: > > <ol> > <li> > <dl><dt>foo</dt><dd>bar</dd></dl> > </li> > </ol> > > I want to get rid of the <dl> list, but I want to retain the text of the > same element. > > I tried using the Find/Replace Element function, but it was impossible. > > The general problem is that the Find/Replace ELement function does not > permit me to create an invalid document Yes, that's the whole point of the Find/Replace Element function. In some cases, may be you'll find more convenient to use Find/Replace (xml source code) in the "XML source" view. > … Hence I am not allowed to Find > all <dl> and replace them with (text) - that is: with nothing. (Because > then <dt> and <dd> would become children of <li>.) > > But for some reason, I am allowed (if I use the Convert element function > of the Edit menu) to do the same thing. Except that in that case, what > happens is that both <dl>, <dt> and <dd> get removed PLUS that the text > of <dd> is retained, Yes. > whereas the text of <dt> is deleted. No. I don't get this. In my test, see screenshots (before.png and after.png), the the text of <dt> is retained too. > I do not get the logic of this … > -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support
before.png
(image/png, 145.4 KB) - not displayed
after.png
(image/png, 132.8 KB) - not displayed