empty elements - add closing tag by default
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 17
- Joined: Wed Oct 28, 2009 8:35 pm
empty elements - add closing tag by default
Hi there,
In our project, we often need to add empty elements to the text (editing only attributes). As you know, empty elements may be written in a short form, omitting the end tag: <example/>; that is equivalent to the full form <example></example>.
In Oxygen, I've found that elements that do not require child elements appear in the short form by default (when adding a new element from Author mode). Is there a way to ask Oxygen to make it default to *always* add the complete form with both opening and closing tags?
We need this:
We get this:
In our project, we often need to add empty elements to the text (editing only attributes). As you know, empty elements may be written in a short form, omitting the end tag: <example/>; that is equivalent to the full form <example></example>.
In Oxygen, I've found that elements that do not require child elements appear in the short form by default (when adding a new element from Author mode). Is there a way to ask Oxygen to make it default to *always* add the complete form with both opening and closing tags?
We need this:
Code: Select all
<REGION REG="Arizona"></REGION>
Code: Select all
<REGION REG="Arizona"/>
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: empty elements - add closing tag by default
Hi,
You can find the option you are looking for in Options -> Preferences -> Editor / Format / XML, Expand empty elements.
Please note that this option also applies to the Format and indent action in Text mode.
Let us know if you require further assistance.
Regards,
Adrian
You can find the option you are looking for in Options -> Preferences -> Editor / Format / XML, Expand empty elements.
Please note that this option also applies to the Format and indent action in Text mode.
Let us know if you require further assistance.
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
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