Quick conversion from qualified to unqualified elements in an XML instance?

Questions about XML that are not covered by the other forums should go here.
mhGLEIF
Posts: 43
Joined: Tue Jul 26, 2016 6:31 pm

Quick conversion from qualified to unqualified elements in an XML instance?

Post by mhGLEIF »

Is there a quick way in oXygen Editor to convert from qualified to unqualified elements in an XML instance?

I'd like to quickly and easily flip between having a prefix on all elements and having no prefix, while at the same time updating the namespace declarations to be consistent.

Is this feature in oXygen somewhere already? Sorry if I am missing it!
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: Quick conversion from qualified to unqualified elements in an XML instance?

Post by Costin »

Hi mhGLEIF,

In oXygen you have the possibility to rename (and implicitly add or remove) specific prefixes in your XML documents.
To remove a specific prefix for elements in a document, you should position the cursor on an element having that specific prefix, right-click and - from the context menu - select Refactoring > Rename Prefix.
The following Rename dialog provides the possibility to choose a replacement prefix (to remove the prefix you should just leave the "New Prefix Name" blank).
Furthermore, you can apply the refactoring action for all the elements in the document that share the same prefix as well as for attribute values.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
Post Reply