Add attribute with value
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 6
- Joined: Thu Dec 22, 2016 2:22 pm
Add attribute with value
Hello,
I have several files where I need to add an attribute with values.
I have a file that looks similar to this:
<text id="124" title="abc" start="1">
<text id="125" title="xyz" start="4">
<text id="126" title="zgh" start="18">
<text id="127" title="jda" start="332">
and i need to add a "end"-attribute with a value of the next element's start attribute's value MINUS 1, so for the the element with the id it would be 3 (because 4-1)
it should look like this:
<text id="124" title="abc" start="1" end="3">
<text id="125" title="xyz" start="4" end="17">
<text id="126" title="zgh" start="18" end="331">
<text id="127" title="jda" start="332" end="">
any ideas or tipps how i could do that fast and easy?
THANK YOU
I have several files where I need to add an attribute with values.
I have a file that looks similar to this:
<text id="124" title="abc" start="1">
<text id="125" title="xyz" start="4">
<text id="126" title="zgh" start="18">
<text id="127" title="jda" start="332">
and i need to add a "end"-attribute with a value of the next element's start attribute's value MINUS 1, so for the the element with the id it would be 3 (because 4-1)
it should look like this:
<text id="124" title="abc" start="1" end="3">
<text id="125" title="xyz" start="4" end="17">
<text id="126" title="zgh" start="18" end="331">
<text id="127" title="jda" start="332" end="">
any ideas or tipps how i could do that fast and easy?
THANK YOU
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