using oxygen to re-order XML attributes
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 1
- Joined: Mon Apr 19, 2010 12:24 pm
using oxygen to re-order XML attributes
hi, i'd love to be able to use oxygen to re-order XML attributes, like this:
<item id="x" name="o" url="oo" desc="aa">
so that this "id, name, url, desc" for instance could become "id, name, desc, url".. on every row. how would i go about doing this, please?
also, can i get specific, defunct, attributes removed automatically?
<item id="x" name="o" url="oo" desc="aa">
so that this "id, name, url, desc" for instance could become "id, name, desc, url".. on every row. how would i go about doing this, please?
also, can i get specific, defunct, attributes removed automatically?
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: using oxygen to re-order XML attributes
Hi,
In the Oxygen Preferences->Editor / Format / XML page there is a checkbox called Sort attributes which can be used to alphabetically sort attributes for a certain element.
If you want your own order and all items are siblings you can pass to the Grid page where you will edit the items in a table view and you will be able to move or delete columns.
You can also use regular expressions in the Oxygen Find/Replace dialog with the Regular expression checkbox checked and the Dot matches all unchecked to perform the sorting like:
Text to find:
id="(.*)" name="(.*)" url="(.*)" desc="(.*)"
Text to replace:
id="$1" name="$2" desc="$4" url="$3"
You can also use regular expressions like:
id="(.*)"
to match and replace with nothing the attributes which are not used anymore.
Regards,
Radu
In the Oxygen Preferences->Editor / Format / XML page there is a checkbox called Sort attributes which can be used to alphabetically sort attributes for a certain element.
If you want your own order and all items are siblings you can pass to the Grid page where you will edit the items in a table view and you will be able to move or delete columns.
You can also use regular expressions in the Oxygen Find/Replace dialog with the Regular expression checkbox checked and the Dot matches all unchecked to perform the sorting like:
Text to find:
id="(.*)" name="(.*)" url="(.*)" desc="(.*)"
Text to replace:
id="$1" name="$2" desc="$4" url="$3"
You can also use regular expressions like:
id="(.*)"
to match and replace with nothing the attributes which are not used anymore.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service