How can I reference text() nodes in the built-in "Delete element" refactoring operation?
Posted: Tue Nov 02, 2021 5:10 pm
I would like to use Oxygen's built-in Elements > Delete element refactoring operation to delete text() nodes in <p> elements.
Given some XML like
I would like to delete the text and leave the <xref>:
However, when I try XPath expressions such as
the refactoring operation tells me "Could not find any resources that would be affected by this operation." I also found that if I tried to delete every node() in <p> elements:
then it would delete named elements but leave the text() nodes:
Somehow the text() nodes are invincible to the Elements > Delete element refactoring operation. Is there a trick to referencing them from the XPath expression textbox?
Given some XML like
Code: Select all
<p>See <xref .../> for more information.</p>
Code: Select all
<p><xref .../></p>
Code: Select all
p/text()
p/self::text()
Code: Select all
p/node()
Code: Select all
<p>See for more information.</p>