changing only one element within an XML document
Oxygen general issues.
-
- Posts: 8
- Joined: Fri Mar 04, 2011 3:28 pm
changing only one element within an XML document
I need some oxygenxml 101 help.
I have a XML document with a one element that I want to change (while the content within that element stays the same), but I don't want to have to write a separate XSLT sheet just to transform one element.
So suppose I have a <p></p> element. Can you please explain to me how I can use Oxygen to change all <p></p> to <h></h>, again while the content remains the same?
Can I do this in the simple find and replace function? If so can you explain how?
Thank you very much,
jw
I have a XML document with a one element that I want to change (while the content within that element stays the same), but I don't want to have to write a separate XSLT sheet just to transform one element.
So suppose I have a <p></p> element. Can you please explain to me how I can use Oxygen to change all <p></p> to <h></h>, again while the content remains the same?
Can I do this in the simple find and replace function? If so can you explain how?
Thank you very much,
jw
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: changing only one element within an XML document
Hello,
You could use the Find/Replace to do this but you would have to check too many options to achieve this("Whole word only", "Enable XML Search options", Search only in "Element names").
It's a lot simpler to use the specialized Rename Element action:
- In the editor right click on the element name and from the popup/contextual menu choose Refactoring -> Rename Element(Alt+Shift+R)
- In the Rename dialog specify the new name(e.g. 'h') and choose the scope of the rename: the current element, the element and its siblings or all the elements with that name(you'll probably want this last one).
Regards,
Adrian
You could use the Find/Replace to do this but you would have to check too many options to achieve this("Whole word only", "Enable XML Search options", Search only in "Element names").
It's a lot simpler to use the specialized Rename Element action:
- In the editor right click on the element name and from the popup/contextual menu choose Refactoring -> Rename Element(Alt+Shift+R)
- In the Rename dialog specify the new name(e.g. 'h') and choose the scope of the rename: the current element, the element and its siblings or all the elements with that name(you'll probably want this last one).
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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