RFE Find/Replace elements

Leif H Silli <[email protected]> Sun, 31 Jul 2022 16:23:44 +0200
Newsgroups gmane.editors.xxe.general
Organization Lenk.no/Silli
Message-ID <[email protected]>
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)?

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 … 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, whereas the text of <dt> is deleted. I do not get 
the logic of this …

Leif

--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support